joker-broker
Access resources conveniently.
Installation
Install with pip:
python3 -m pip install joker-broker
Create default config file at ~/.joker/broker/resources.yml
python3 -m joker.broker.default
Usage
Use in an interactive shell like this:
from joker.broker import get_resource_broker
# use default conf file just created by `python3 -m joker.broker.default`
rb = get_resource_broker()
rb.primary.execute('create table users(id int, username text, email text)')
records = [
{
'id': 1,
'username': 'Alice',
'email': 'alice@example.com',
},
{
'id': 2,
'username': 'Bob',
'email': 'bob@example.com',
}
]
tbl = rb.primary.get_table('users')
ins = tbl.insert()
ins.execute(records)
list(tbl.select().execute())
Use ResourceBroker for your project:
from joker.broker import ResourceBroker
_resource_broker = None
def get_resource_broker():
global _resource_broker
if _resource_broker is None:
path = '/data/myapp/broker.yml' # path to your conf
_resource_broker = ResourceBroker.create(path)
return _resource_broker
Metadata
Release files for joker-broker 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| joker-broker-0.5.0.tar.gz | 12.3 kB | Without provenance | Details for joker-broker-0.5.0.tar.gz |
Release files / joker-broker-0.5.0.tar.gz
| Download URL | joker-broker-0.5.0.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fe9952d21f4236452fa28cbdd762278278531508cf7075fc8597a6c8040646e
|
|
BLAKE2b-256 checksum How to use checksums |
47dfbe54615ae7574692bba1fbf05a445c5523c73d99ee3d9b149a92669ccfed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
|
Security for joker-broker 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.