Skip to main content

Bubbleio Python API

Project overview

This python package is a toolset to query Bubble.io API. This package uses Pandas DataFrame to returns results.

Pandas.DataFrame lets you query the data, process it, save it (ant later on uptate changes directly to Bubble app with this package).

⚠ Warning: This project is quite new (october 2021), and breaking changes may appears until version 1.0

Installation

python -m pip install -U pip
python -m pip install bubbleio

Package documentation

https://vlebert.github.io/bubbleio/

Bubble.io API documentation

https://manual.bubble.io/core-resources/api/data-api

Roadmap

  • GET function : 80%
    • TODO: Sorting options
  • TODO: PATCH function : 0%
  • TODO: Bulk PATCH
  • ...

Example of usage :

>>> from bubbleio import Bubbleio
>>> API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
>>> API_ROOT = "https://appname.bubbleapps.io/api/1.1/obj"
>>> bbio = Bubbleio(API_KEY, API_ROOT)
>>> bbio.get("fooType")

{
    "cursor": 0,
    "results": [
        {
            "foo_field_1": "value1",
            "foo_field_2": "value2",
            "_id": "item1_bubble_id"
        },
        {
            "foo_field_1": "value3",
            "foo_field_2": "value4",
            "_id": "item2_bubble_id"
        },
        ...
    ],
    "remaining": 0,
    "count": 31
}

>>> bbio.get("fooType", constraints=[
...     {"key": "foo_field_1", "value": "value1", "constraint_type":"equals"}
... ])

{
    "cursor": 0,
    "results": [
        {
            "foo_field_1": "value1",
            "foo_field_2": "value2",
            "_id": "item1_bubble_id"
        }
    ],
    "remaining": 0,
    "count": 1
}
>>> from bubbleio import Bubbleio
>>> bbio = Bubbleio(API_KEY, API_ROOT)
>>> joins_ = [
...     {
...         "field": "fooBar",
...         "typename": "barType",
...     }
... ]
>>> bbio.get_results("fooType")

_id     fooField1   fooField2   fooBar
idFoo1  value       value       idBar1
idFoo2  value       value       idBar2

>>> bbio.get_results("barType")

_id     barField1   barField2
idBar1  value       value
idBar2  value       value

>>> bbio.get_all_results_as_df("fooType", joins=joins_)

_id     fooField1   fooField2   fooBar  fooBar__id      fooBar_barField1   fooBar_barField2
idFoo1  value       value       idBar1  idBar1          value              value
idFoo2  value       value       idBar2  idBar2          value              value

Metadata

Release files for bubbleio 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bubbleio 0.6.1
File Size Uploaded
bubbleio-0.6.1.tar.gz 18.1 kB Details

Release files / bubbleio-0.6.1.tar.gz

Download URL bubbleio-0.6.1.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2e08a14df57921e900e8fd9d3828763bdb48e6821b5f3a471c661d26a3cca650
BLAKE2b-256 checksum
How to use checksums
5651f399a42da0d406aba4d9f2f96ee521e5cf621629433c2dd677716787ae75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.15

Release history Release notifications | RSS feed

This release

0.6.1 This release

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5

1 release file

0.4.0

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page