Bubble-Client
Python client for the Bubble.io APIs
Installation
pip install bubble-client
Examples
- Get users (or any Bubble thing, really):
>>> from bubble_client import configure, BubbleThing
>>> configure(base_url=..., token=...)
>>> class User(BubbleThing):
... pass
>>> async for user in User.get():
... print(user)
User({'name': 'Beatrix Emery', ...})
User({'name': 'Dr. Jekyll', ...})
>>> user.name
'Dr. Jekyll'
- Change values:
>>> user.name = "Mr. Hyde"
>>> await user.save()
>>> user.name
'Mr. Hyde'
- Count users:
>>> User.count()
2
- Add a new user:
>>> user = User(name="Sir Charles Emery")
>>> await user.save()
>>> User.count()
3
- Join stuff!
>>> class Pet(BubbleThing):
... pass
>>> pet = await pet.get_one()
>>> await pet.join("created_by", User)
>>> pet.type
'dog'
>>> pet.created_by
User({'name': 'Mr. Hyde', ...})
>>> pet.created_by.name
'Mr. Hyde'
- Also works on cursors!
>>> async for pet in Pet.get().join("created_by", User):
... print(pet)
Pet({'type': 'dog', 'created_by': User({'name': 'Mr. Hyde', ...}), ...})
Pet({'type': 'donkey', 'created_by': User({'name': 'Beatrix Emery', ...}), ...})
Metadata
Release files for bubble-client 0.7.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bubble-client-0.7.3.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bubble_client-0.7.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 9.5 kB
Release files / bubble-client-0.7.3.tar.gz
| Download URL | bubble-client-0.7.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78fea899bd5770f2a13ca1703e5125c0942d8e46209520b92a0913bce8819abe
|
|
BLAKE2b-256 checksum How to use checksums |
aff5f50850b426e5c11fe3581ac674f4fcfaea9fdbce66d82497d54e5a43e620
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / bubble_client-0.7.3-py2.py3-none-any.whl
| Download URL | bubble_client-0.7.3-py2.py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cfdee5540b94298c704f5cd46fd5a5b59a5fe67c981640cc9dc4cec89011000a
|
|
BLAKE2b-256 checksum How to use checksums |
72216861179bdabc7044f787338fdd77c3648e3c0f781fcae14b6303eb222ad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|