Python client for Bubble.io APIs
Project description
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': 'Dr. Jekyll', ...})
User({'name': 'Mr. Hyde', ...})
>>> user.name
'Mr. Hyde'
- 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': 'Dr. Jekyll', ...}), ...})
Pet({'type': 'donkey', 'created_by': User({'name': 'Dr. Jekyll', ...}), ...})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bubble-client-0.2.0.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for bubble_client-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6db5926e88de8c233d055dddcde1418413fb7563c7cb9309fa019a2a886dca6c |
|
MD5 | 6bf3074f2509a6a95bf055ebd3596c04 |
|
BLAKE2b-256 | 1e4ad3d5bcf3248a24ad3fb4c958d7640f0af9dd41a04ab94f49035f154cc461 |