You can use boolean logic (e.g. AND/OR/NOT) for complex search queries. For more help and examples, see the search documentation.
Search by package name:
my-package (implicit)
name:my-package (explicit)
Search by package filename:
filename:my-package.ext
Search by package tag:
tag:latest
Search by package version:
version:1.0.0
prerelease:true (prereleases)
prerelease:false (no prereleases)
Search by package architecture:
architecture:x86_64
Search by package distribution:
distribution:el
Search by package license:
license:MIT
Search by package format:
format:deb
Search by package status:
status:in_progress
Search by package file checksum:
checksum:5afba
Search by package security status:
severity:critical
Search by package vulnerabilities:
vulnerabilities:>1
vulnerabilities:<1000
Search by # of package downloads:
downloads:>8
downloads:<100
Search by package type:
type:binary
type:source
Search by package size (bytes):
size:>50000
size:<10000
Search by dependency name/version:
dependency:log4j
dependency:log4j=1.0.0
dependency:log4j>1.0.0
Search by uploaded date:
uploaded:>"1 day ago"
uploaded:<"August 14, 2022 EST"
Search by entitlement token (identifier):
entitlement:3lKPVJPosCsY
Search by policy violation:
policy_violated:true
deny_policy_violated:true
license_policy_violated:true
vulnerability_policy_violated:true
Search by repository:
repository:repo-name
Search by last download date:
last_downloaded:<"30 days ago"
last_downloaded:>"August 14, 2022 EST"
Search queries for all Debian-specific (and related) package types
Search by component:
deb_component:unstable
Search queries for all Maven-specific (and related) package types
Search by group ID:
maven_group_id:org.apache
Search queries for all Docker-specific (and related) package types
Search by image digest:
docker_image_digest:sha256:7c5..6d4
(full hashref only)
Search by layer digest:
docker_layer_digest:sha256:4c4..ae4
(full hashref only)
Search queries for all Generic-specific package types
Search by file path:
generic_filepath:path/to/file.txt
Search by directory:
generic_directory:path/to
Field type modifiers (depending on the type, you can influence behaviour)
For all queries, you can use:
~foo for negation
For string queries, you can use:
^foo to anchor to start of term
foo$ to anchor to end of term
foo*bar for fuzzy matching
For number/date or version queries, you can use:
>foo for values greater than
>=foo for values greater / equal
<foo for values less than
<=foo for values less / equal
Need a secure and centralised artifact repository to deliver Alpine,
Cargo,
CocoaPods,
Composer,
Conan,
Conda,
CRAN,
Dart,
Debian,
Docker,
Generic,
Go,
Helm,
Hex,
HuggingFace,
LuaRocks,
Maven,
npm,
NuGet,
P2,
Python,
RedHat,
Ruby,
Swift,
Terraform,
Vagrant,
VSX,
Raw & More packages?
Cloudsmith is the new standard in Package / Artifact Management and Software Distribution.
With support for all major package formats, you can trust us to manage your software supply chain.
bumbo
0.0.14
One-liner (summary)
Description
# Bumbo: Python Web Framework built for learning purposes
 
Bumbo is a Python web framework built for learning purposes.
It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.
## Installation
`shell pip install bumbo `
## How to use it
### Basic usage:
```python from bumbo.api import API
app = API()
@app.route("/home") def home(request, response):
response.text = "Hello from the HOME page"
@app.route("/hello/{name}") def greeting(request, response, name):
response.text = f"Hello, {name}"
@app.route("/book") class BooksResource:
- def get(self, req, resp):
- resp.text = "Books Page"
- def post(self, req, resp):
- resp.text = "Endpoint to create a book"
@app.route("/template") def template_handler(req, resp):
- resp.body = app.template(
- "index.html", context={"name": "Bumbo", "title": "Best Framework"}).encode()
### Unit Tests
The recommended way of writing unit tests is with [pytest](https://docs.pytest.org/en/latest/). There are two built in fixtures that you may want to use when writing unit tests with Bumbo. The first one is app which is an instance of the main API class:
```python def test_route_overlap_throws_exception(app):
@app.route("/") def home(req, resp):
resp.text = "Welcome Home."
- with pytest.raises(AssertionError):
@app.route("/") def home2(req, resp):
resp.text = "Welcome Home2."
The other one is client that you can use to send HTTP requests to your handlers. It is based on the famous [requests](http://docs.python-requests.org/en/master/) and it should feel very familiar:
```python def test_parameterized_route(app, client):
@app.route("/{name}") def hello(req, resp, name):
resp.text = f"hey {name}"assert client.get("http://testserver/matthew").text == "hey matthew"
## Templates
The default folder for templates is templates. You can change it when initializing the main API() class:
`python app = API(templates_dir="templates_dir_name") `
Then you can use HTML files in that folder like so in a handler:
```python @app.route("/show/template") def handler_with_template(req, resp):
- resp.html = app.template(
- "example.html", context={"title": "Awesome Framework", "body": "welcome to the future!"})
## Static Files
Just like templates, the default folder for static files is static and you can override it:
`python app = API(static_dir="static_dir_name") `
Then you can use the files inside this folder in HTML files:
```html <!DOCTYPE html> <html lang="en">
- <head>
<meta charset="UTF-8"> <title>{{title}}</title>
<link href="/static/main.css" rel="stylesheet" type="text/css">
</head>
- <body>
- <h1>{{body}}</h1> <p>This is a paragraph</p>
### Middleware
You can create custom middleware classes by inheriting from the bumbo.middleware.Middleware class and overriding its two methods that are called before and after each request:
```python from bumbo.api import API from bumbo.middleware import Middleware
app = API()
- class SimpleCustomMiddleware(Middleware):
- def process_request(self, req):
- print("Before dispatch", req.url)
- def process_response(self, req, res):
- print("After dispatch", req.url)
app.add_middleware(SimpleCustomMiddleware)
License
Size
6.3 KB
Downloads
5
Tags
bdist/wheel whl noarch py3 python-upstream-pro… upstream latest
| Status | Completed |
|---|---|
| Checksum (MD5) | 6fda2c20400dd715cf0e6756e13a26b1 |
| Checksum (SHA-1) | 55644ccbb2a1631e61265cf0b4de84d65e4111d3 |
| Checksum (SHA-256) | d8edf4594e20e82e2331d3c56149b1ec1931c7bf6658fa4184f65d9d5a835d19 |
| Checksum (SHA-512) | d1073eb8f77a946a90e5fa02533926036c82f78a780238346272cca1226f29dcd4… |
| GPG Signature | |
| GPG Fingerprint | 6811684bac0b8895434e97bdd4391b8fb999e537 |
| Storage Region | Dublin, Ireland |
| Type | Binary (contains binaries and binary artifacts) |
| Uploaded At | 4 months, 2 weeks ago |
| Uploaded By |
|
| Slug Id | bumbo-0014-py3-none-anywhl-d0yj |
| Unique Id | upRnB7LGarfG0ioo |
| Version (Raw) | 0.0.14 |
| Version (Parsed) |
|
| extended metadata | |
| Author | Jahongir Rahmonov <jrahmonov2@gmail.com> |
| Classifiers | Programming Language :: Python :: 3.6 |
| Metadata Version | 2.1 |
| Py Filetype | bdist_wheel |
| Py Version | py3 |
| Requires Dist | Jinja2 (==2.10.1) | WebOb (==1.8.5) | parse (==1.12.0) | requests (==2.22.0) | requests-wsgi-adapter (==0.4.1) | whitenoise (==4.1.2) |
| Requires Python | >=3.6.0 |
| pkg | bumbo-0.0.14-py3-none-any.whl |
5
6.3 KB |
md5 | sha1 | sha256 | sha512 |
This package has 12 files/directories.
Last scanned
4 months, 2 weeks ago
Scan result
Clean
Vulnerability count
0
Max. severity
UnknownPackage statistics are no longer available on cloudsmith.io. Please visit our new web app to access this feature.
You can embed a badge in another website that shows this or the latest version of this package.
To embed the badge for this specific package version, use the following:
[](https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/)
|This version of 'bumbo' @ Cloudsmith|
.. |This version of 'bumbo' @ Cloudsmith| image:: https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/?render=true
:target: https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/
image::https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/?render=true[link="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/",title="This version of 'bumbo' @ Cloudsmith"]
<a href="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/"><img src="https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bumbo/0.0.14/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/?render=true" alt="This version of 'bumbo' @ Cloudsmith" /></a>
rendered as:
To embed the badge for the latest package version, use the following:
[](https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/)
|Latest version of 'bumbo' @ Cloudsmith|
.. |Latest version of 'bumbo' @ Cloudsmith| image:: https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/?render=true&show_latest=true
:target: https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/
image::https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/?render=true&show_latest=true[link="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/",title="Latest version of 'bumbo' @ Cloudsmith"]
<a href="https://cloudsmith.io/~demo-docs/repos/awesome-repo/packages/detail/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/"><img src="https://api.cloudsmith.com/v1/badges/version/demo-docs/awesome-repo/python/bumbo/latest/a=noarch;xf=bdist_wheel;xn=bumbo;xv=py3/?render=true&show_latest=true" alt="Latest version of 'bumbo' @ Cloudsmith" /></a>
rendered as:
These instructions assume you have setup the repository first (or read it).
To install/use bumbo @ version 0.0.14 ...
pip install 'bumbo==0.0.14'
You can also install the latest version of this package:
pip install --upgrade 'bumbo'
If necessary, you can specify the repository directly:
pip install \
--index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/ \
bumbo==0.0.14
If you've got a project requirements.txt file, you can specify this as a dependency:
--index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
bumbo==0.0.14
In addition, you can use this repository as an extra index url. However, please read our documentation on this parameter before using it. For example in a requirements.txt file:
--extra-index-url=https://dl.cloudsmith.io/public/demo-docs/awesome-repo/python/simple/
bumbo==0.0.14