Skip to content

Commit 5dacbb8

Browse files
committed
prepare release 0.0.1a4
1 parent 5c865e9 commit 5dacbb8

6 files changed

Lines changed: 254 additions & 151 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "bubble-data-api-client"
3-
version = "0.0.1a3"
3+
version = "0.0.1a4"
44
description = "Python client for Bubble Data API"
55
readme = "README.md"
66
requires-python = ">=3.13"
@@ -13,11 +13,11 @@ dependencies = [
1313
dev = [
1414
"coverage~=7.8",
1515
"pytest~=8.3",
16-
"pytest-asyncio~=0.26.0",
16+
"pytest-asyncio~=1.0",
1717
"ruff~=0.11",
1818
"respx~=0.22",
1919
"python-dotenv~=1.1.0",
20-
"ipython~=9.2.0",
20+
"ipython~=9.4.0",
2121
]
2222

2323
# ruff configuration

requirements.txt

Lines changed: 72 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ asttokens==3.0.0 \
1212
--hash=sha256:0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7 \
1313
--hash=sha256:e3078351a059199dd5138cb1c706e6430c05eff2ff136af5eb4790f9d28932e2
1414
# via stack-data
15-
certifi==2025.4.26 \
16-
--hash=sha256:0a816057ea3cdefcef70270d2c515e4506bbc954f417fa5ade2021213bb8f0c6 \
17-
--hash=sha256:30350364dfe371162649852c63336a15c70c6510c2ad5015b21c2345311805f3
15+
certifi==2025.7.14 \
16+
--hash=sha256:6b31f564a415d79ee77df69d757bb49a5bb53bd9f756cbbe24394ffd6fc1f4b2 \
17+
--hash=sha256:8ea99dbdfaaf2ba2f9bac77b9249ef62ec5218e7c2b2e903378ed5fccf765995
1818
# via
1919
# httpcore
2020
# httpx
@@ -24,29 +24,31 @@ colorama==0.4.6 ; sys_platform == 'win32' \
2424
# via
2525
# ipython
2626
# pytest
27-
coverage==7.8.0 \
28-
--hash=sha256:04bfec25a8ef1c5f41f5e7e5c842f6b615599ca8ba8391ec33a9290d9d2db3a3 \
29-
--hash=sha256:18c5ae6d061ad5b3e7eef4363fb27a0576012a7447af48be6c75b88494c6cf25 \
30-
--hash=sha256:2e4b6b87bb0c846a9315e3ab4be2d52fac905100565f4b92f02c445c8799e257 \
31-
--hash=sha256:379fe315e206b14e21db5240f89dc0774bdd3e25c3c58c2c733c99eca96f1ada \
32-
--hash=sha256:42421e04069fb2cbcbca5a696c4050b84a43b05392679d4068acbe65449b5c64 \
33-
--hash=sha256:554fec1199d93ab30adaa751db68acec2b41c5602ac944bb19187cb9a41a8067 \
34-
--hash=sha256:581a40c7b94921fffd6457ffe532259813fc68eb2bdda60fa8cc343414ce3733 \
35-
--hash=sha256:5aaeb00761f985007b38cf463b1d160a14a22c34eb3f6a39d9ad6fc27cb73008 \
36-
--hash=sha256:5ac46d0c2dd5820ce93943a501ac5f6548ea81594777ca585bf002aa8854cacd \
37-
--hash=sha256:771eb7587a0563ca5bb6f622b9ed7f9d07bd08900f7589b4febff05f469bea00 \
38-
--hash=sha256:7a3d62b3b03b4b6fd41a085f3574874cf946cb4604d2b4d3e8dca8cd570ca501 \
39-
--hash=sha256:95aa6ae391a22bbbce1b77ddac846c98c5473de0372ba5c463480043a07bff42 \
40-
--hash=sha256:a9abbccd778d98e9c7e85038e35e91e67f5b520776781d9a1e2ee9d400869487 \
41-
--hash=sha256:ad80e6b4a0c3cb6f10f29ae4c60e991f424e6b14219d46f1e7d442b938ee68a4 \
42-
--hash=sha256:b87eb6fc9e1bb8f98892a2458781348fa37e6925f35bb6ceb9d4afd54ba36c73 \
43-
--hash=sha256:d1ba00ae33be84066cfbe7361d4e04dec78445b2b88bdb734d0d1cbab916025a \
44-
--hash=sha256:d766a4f0e5aa1ba056ec3496243150698dc0481902e2b8559314368717be82b1 \
45-
--hash=sha256:dbf364b4c5e7bae9250528167dfe40219b62e2d573c854d74be213e1e52069f7 \
46-
--hash=sha256:dd19608788b50eed889e13a5d71d832edc34fc9dfce606f66e8f9f917eef910d \
47-
--hash=sha256:e013b07ba1c748dacc2a80e69a46286ff145935f260eb8c72df7185bf048f502 \
48-
--hash=sha256:f319bae0321bc838e205bf9e5bc28f0a3165f30c203b610f17ab5552cff90323 \
49-
--hash=sha256:f3c38e4e5ccbdc9198aecc766cedbb134b2d89bf64533973678dfcf07effd883
27+
coverage==7.9.2 \
28+
--hash=sha256:0a07757de9feb1dfafd16ab651e0f628fd7ce551604d1bf23e47e1ddca93f08a \
29+
--hash=sha256:115db3d1f4d3f35f5bb021e270edd85011934ff97c8797216b62f461dd69374b \
30+
--hash=sha256:1df6b76e737c6a92210eebcb2390af59a141f9e9430210595251fbaf02d46926 \
31+
--hash=sha256:256ea87cb2a1ed992bcdfc349d8042dcea1b80436f4ddf6e246d6bee4b5d73b6 \
32+
--hash=sha256:2d0d4f6ecdf37fcc19c88fec3e2277d5dee740fb51ffdd69b9579b8c31e4232e \
33+
--hash=sha256:48f82f889c80af8b2a7bb6e158d95a3fbec6a3453a1004d04e4f3b5945a02694 \
34+
--hash=sha256:55a28954545f9d2f96870b40f6c3386a59ba8ed50caf2d949676dac3ecab99f5 \
35+
--hash=sha256:619317bb86de4193debc712b9e59d5cffd91dc1d178627ab2a77b9870deb2868 \
36+
--hash=sha256:6406cff19880aaaadc932152242523e892faff224da29e241ce2fca329866584 \
37+
--hash=sha256:82c3939264a76d44fde7f213924021ed31f55ef28111a19649fec90c0f109e6d \
38+
--hash=sha256:82d76ad87c932935417a19b10cfe7abb15fd3f923cfe47dbdaa74ef4e503752d \
39+
--hash=sha256:9303aed20872d7a3c9cb39c5d2b9bdbe44e3a9a1aecb52920f7e7495410dfab8 \
40+
--hash=sha256:985abe7f242e0d7bba228ab01070fde1d6c8fa12f142e43debe9ed1dde686038 \
41+
--hash=sha256:997024fa51e3290264ffd7492ec97d0690293ccd2b45a6cd7d82d945a4a80c8b \
42+
--hash=sha256:ae5d563e970dbe04382f736ec214ef48103d1b875967c89d83c6e3f21706d5b3 \
43+
--hash=sha256:bc18ea9e417a04d1920a9a76fe9ebd2f43ca505b81994598482f938d5c315f46 \
44+
--hash=sha256:bcd5ebe66c7a97273d5d2ddd4ad0ed2e706b39630ed4b53e713d360626c3dbb3 \
45+
--hash=sha256:bdd612e59baed2a93c8843c9a7cb902260f181370f1d772f4842987535071d14 \
46+
--hash=sha256:c33624f50cf8de418ab2b4d6ca9eda96dc45b2c4231336bac91454520e8d1fac \
47+
--hash=sha256:c48c2375287108c887ee87d13b4070a381c6537d30e8487b24ec721bf2a781cb \
48+
--hash=sha256:cdef6504637731a63c133bb2e6f0f0214e2748495ec15fe42d1e219d1b133f0b \
49+
--hash=sha256:e425cd5b00f6fc0ed7cdbd766c70be8baab4b7839e4d4fe5fac48581dd968ea4 \
50+
--hash=sha256:f44ae036b63c8ea432f610534a2668b0c3aee810e7037ab9d8ff6883de480f5b \
51+
--hash=sha256:f5fd54310b92741ebe00d9c0d1d7b2b27463952c022da6d47c175d246a98d1bd
5052
decorator==5.2.1 \
5153
--hash=sha256:65f266143752f734b0a7cc83c46f4618af75b8c5911b00ccb61d0ac9b6da0360 \
5254
--hash=sha256:d316bb415a2d9e2d2b3abcc4084c6502fc09240e292cd76a76afc106a1c8e04a
@@ -79,9 +81,9 @@ iniconfig==2.1.0 \
7981
--hash=sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7 \
8082
--hash=sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760
8183
# via pytest
82-
ipython==9.2.0 \
83-
--hash=sha256:62a9373dbc12f28f9feaf4700d052195bf89806279fc8ca11f3f54017d04751b \
84-
--hash=sha256:fef5e33c4a1ae0759e0bba5917c9db4eb8c53fee917b6a526bd973e1ca5159f6
84+
ipython==9.4.0 \
85+
--hash=sha256:25850f025a446d9b359e8d296ba175a36aedd32e83ca9b5060430fe16801f066 \
86+
--hash=sha256:c033c6d4e7914c3d9768aabe76bbe87ba1dc66a92a05db6bfa1125d81f2ee270
8587
ipython-pygments-lexers==1.1.1 \
8688
--hash=sha256:09c0138009e56b6854f9535736f4171d855c8c08a563a0dcd8022f78355c7e81 \
8789
--hash=sha256:a9462224a505ade19a605f71f8fa63c2048833ce50abc86768a0d81d876dc81c
@@ -122,9 +124,9 @@ pure-eval==0.2.3 \
122124
--hash=sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0 \
123125
--hash=sha256:5f4e983f40564c576c7c8635ae88db5956bb2229d7e9237d03b3c0b0190eaf42
124126
# via stack-data
125-
pydantic==2.11.4 \
126-
--hash=sha256:32738d19d63a226a52eed76645a98ee07c1f410ee41d93b4afbfa85ed8111c2d \
127-
--hash=sha256:d9615eaa9ac5a063471da949c8fc16376a84afb5024688b3ff885693506764eb
127+
pydantic==2.11.7 \
128+
--hash=sha256:d989c3c6cb79469287b1569f7447a17848c998458d49ebe294e975b9baf0f0db \
129+
--hash=sha256:dde5df002701f6de26248661f6835bbe296a47bf73990135c7d07ce741b9623b
128130
# via bubble-data-api-client
129131
pydantic-core==2.33.2 \
130132
--hash=sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56 \
@@ -146,44 +148,45 @@ pydantic-core==2.33.2 \
146148
--hash=sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9 \
147149
--hash=sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6
148150
# via pydantic
149-
pygments==2.19.1 \
150-
--hash=sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f \
151-
--hash=sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c
151+
pygments==2.19.2 \
152+
--hash=sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887 \
153+
--hash=sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b
152154
# via
153155
# ipython
154156
# ipython-pygments-lexers
155-
pytest==8.3.5 \
156-
--hash=sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820 \
157-
--hash=sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845
157+
# pytest
158+
pytest==8.4.1 \
159+
--hash=sha256:539c70ba6fcead8e78eebbf1115e8b589e7565830d7d006a8723f19ac8a0afb7 \
160+
--hash=sha256:7c67fd69174877359ed9371ec3af8a3d2b04741818c51e5e99cc1742251fa93c
158161
# via pytest-asyncio
159-
pytest-asyncio==0.26.0 \
160-
--hash=sha256:7b51ed894f4fbea1340262bdae5135797ebbe21d8638978e35d31c6d19f72fb0 \
161-
--hash=sha256:c4df2a697648241ff39e7f0e4a73050b03f123f760673956cf0d72a4990e312f
162-
python-dotenv==1.1.0 \
163-
--hash=sha256:41f90bc6f5f177fb41f53e87666db362025010eb28f60a01c9143bfa33a2b2d5 \
164-
--hash=sha256:d7c01d9e2293916c18baf562d95698754b0dbbb5e74d457c45d4f6561fb9d55d
162+
pytest-asyncio==1.0.0 \
163+
--hash=sha256:4f024da9f1ef945e680dc68610b52550e36590a67fd31bb3b4943979a1f90ef3 \
164+
--hash=sha256:d15463d13f4456e1ead2594520216b225a16f781e144f8fdf6c5bb4667c48b3f
165+
python-dotenv==1.1.1 \
166+
--hash=sha256:31f23644fe2602f88ff55e1f5c79ba497e01224ee7737937930c448e4d0e24dc \
167+
--hash=sha256:a8a6399716257f45be6a007360200409fce5cda2661e3dec71d23dc15f6189ab
165168
respx==0.22.0 \
166169
--hash=sha256:3c8924caa2a50bd71aefc07aa812f2466ff489f1848c96e954a5362d17095d91 \
167170
--hash=sha256:631128d4c9aba15e56903fb5f66fb1eff412ce28dd387ca3a81339e52dbd3ad0
168-
ruff==0.11.10 \
169-
--hash=sha256:1067245bad978e7aa7b22f67113ecc6eb241dca0d9b696144256c3a879663bca \
170-
--hash=sha256:2f071b0deed7e9245d5820dac235cbdd4ef99d7b12ff04c330a241ad3534319f \
171-
--hash=sha256:3afead355f1d16d95630df28d4ba17fb2cb9c8dfac8d21ced14984121f639bad \
172-
--hash=sha256:4a60e3a0a617eafba1f2e4186d827759d65348fa53708ca547e384db28406a0b \
173-
--hash=sha256:5a94acf798a82db188f6f36575d80609072b032105d114b0f98661e1679c9125 \
174-
--hash=sha256:5b6a9cc5b62c03cc1fea0044ed8576379dbaf751d5503d718c973d5418483641 \
175-
--hash=sha256:5cc725fbb4d25b0f185cb42df07ab6b76c4489b4bfb740a175f3a59c70e8a224 \
176-
--hash=sha256:607ecbb6f03e44c9e0a93aedacb17b4eb4f3563d00e8b474298a201622677947 \
177-
--hash=sha256:7b3a522fa389402cd2137df9ddefe848f727250535c70dafa840badffb56b7a4 \
178-
--hash=sha256:859a7bfa7bc8888abbea31ef8a2b411714e6a80f0d173c2a82f9041ed6b50f58 \
179-
--hash=sha256:8b4564e9f99168c0f9195a0fd5fa5928004b33b377137f978055e40008a082c5 \
180-
--hash=sha256:968220a57e09ea5e4fd48ed1c646419961a0570727c7e069842edd018ee8afed \
181-
--hash=sha256:d522fb204b4959909ecac47da02830daec102eeb100fb50ea9554818d47a5fa6 \
182-
--hash=sha256:da8ec977eaa4b7bf75470fb575bea2cb41a0e07c7ea9d5a0a97d13dbca697bf2 \
183-
--hash=sha256:dc061a98d32a97211af7e7f3fa1d4ca2fcf919fb96c28f39551f35fc55bdbc19 \
184-
--hash=sha256:ddf8967e08227d1bd95cc0851ef80d2ad9c7c0c5aab1eba31db49cf0a7b99523 \
185-
--hash=sha256:ef69637b35fb8b210743926778d0e45e1bffa850a7c61e428c6b971549b5f5d1 \
186-
--hash=sha256:f4854fd09c7aed5b1590e996a81aeff0c9ff51378b084eb5a0b9cd9518e6cff2
171+
ruff==0.12.3 \
172+
--hash=sha256:023040a3499f6f974ae9091bcdd0385dd9e9eb4942f231c23c57708147b06311 \
173+
--hash=sha256:0262d50ba2767ed0fe212aa7e62112a1dcbfd46b858c5bf7bbd11f326998bafc \
174+
--hash=sha256:0a9153b000c6fe169bb307f5bd1b691221c4286c133407b8827c406a55282041 \
175+
--hash=sha256:12371aec33e1a3758597c5c631bae9a5286f3c963bdfb4d17acdd2d395406687 \
176+
--hash=sha256:2120d3aa855ff385e0e562fdee14d564c9675edbe41625c87eeab744a7830d12 \
177+
--hash=sha256:40dced4a79d7c264389de1c59467d5d5cefd79e7e06d1dfa2c75497b5269a5a6 \
178+
--hash=sha256:47552138f7206454eaf0c4fe827e546e9ddac62c2a3d2585ca54d29a890137a2 \
179+
--hash=sha256:560f13b6baa49785665276c963edc363f8ad4b4fc910a883e2625bdb14a83a9e \
180+
--hash=sha256:5f9c7c9c8f84c2d7f27e93674d27136fbf489720251544c4da7fb3d742e011b1 \
181+
--hash=sha256:6b16647cbb470eaf4750d27dddc6ebf7758b918887b56d39e9c22cce2049082b \
182+
--hash=sha256:883d844967bffff5ab28bba1a4d246c1a1b2933f48cb9840f3fdc5111c603b07 \
183+
--hash=sha256:a946cf1e7ba3209bdef039eb97647f1c77f6f540e5845ec9c114d3af8df873e7 \
184+
--hash=sha256:c4faaff1f90cea9d3033cbbcdf1acf5d7fb11d8180758feb31337391691f3df0 \
185+
--hash=sha256:dfd45e6e926deb6409d0616078a666ebce93e55e07f0fb0228d4b2608b2c248d \
186+
--hash=sha256:e1417051edb436230023575b149e8ff843a324557fe0a265863b7602df86722f \
187+
--hash=sha256:e2506961bf6ead54887ba3562604d69cb430f59b42133d36976421bc8bd45901 \
188+
--hash=sha256:f1b5a4b6668fd7b7ea3697d8d98857390b40c1320a63a178eee6be0899ea2d77 \
189+
--hash=sha256:fa6b24600cf3b750e48ddb6057e901dd5b9aa426e316addb2a1af185a7509882
187190
sniffio==1.3.1 \
188191
--hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 \
189192
--hash=sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc
@@ -198,16 +201,16 @@ traitlets==5.14.3 \
198201
# via
199202
# ipython
200203
# matplotlib-inline
201-
typing-extensions==4.13.2 \
202-
--hash=sha256:a439e7c04b49fec3e5d3e2beaa21755cadbbdc391694e28ccdd36ca4a1408f8c \
203-
--hash=sha256:e6c81219bd689f51865d9e372991c540bda33a0379d5573cddb9a3a23f7caaef
204+
typing-extensions==4.14.1 \
205+
--hash=sha256:38b39f4aeeab64884ce9f74c94263ef78f3c22467c8724005483154c26648d36 \
206+
--hash=sha256:d1e1e3b58374dc93031d6eda2420a48ea44a36c2b4766a4fdeb3710755731d76
204207
# via
205208
# pydantic
206209
# pydantic-core
207210
# typing-inspection
208-
typing-inspection==0.4.0 \
209-
--hash=sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f \
210-
--hash=sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122
211+
typing-inspection==0.4.1 \
212+
--hash=sha256:389055682238f53b04f7badcb49b989835495a96700ced5dab2d8feae4b26f51 \
213+
--hash=sha256:6ae134cc0203c33377d43188d4064e9b357dba58cff3185f22924610e70a9d28
211214
# via pydantic
212215
wcwidth==0.2.13 \
213216
--hash=sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859 \

src/bubble_data_api_client/client/raw_client.py

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,68 @@
1+
import json
12
import types
23
import typing
4+
from typing import TypedDict
35

46
import httpx
57

68
from bubble_data_api_client.transport import Transport
79

810

11+
# all constraints are of the form:
12+
class BaseConstraint(TypedDict):
13+
key: str
14+
constraint_type: str
15+
16+
17+
# some constraints have a value, some do not
18+
class Constraint(BaseConstraint, total=False):
19+
value: str
20+
21+
22+
# https://manual.bubble.io/core-resources/api/the-bubble-api/the-data-api/data-api-requests#sorting
23+
# in addition to 'sort_field' and 'descending', it is possible to have
24+
# multiple additional sort fields
25+
class AdditionalSortField(TypedDict):
26+
sort_field: str
27+
descending: bool
28+
29+
30+
# https://manual.bubble.io/core-resources/api/the-bubble-api/the-data-api/data-api-requests#constraint-types
31+
class ConstraintTypes:
32+
# Use to test strict equality
33+
EQUALS = "equals"
34+
NOT_EQUAL = "not equal"
35+
36+
# Use to test whether a thing's given field is empty or not
37+
IS_EMPTY = "is_empty"
38+
IS_NOT_EMPTY = "is_not_empty"
39+
40+
# Use to test whether a text field contains a string.
41+
# Text contains will not respect partial words that are not of the same stem.
42+
TEXT_CONTAINS = "text contains"
43+
NOT_TEXT_CONTAINS = "not text contains"
44+
45+
# Use to compare a thing's field value relative to a given value
46+
GREATER_THAN = "greater than"
47+
LESS_THAN = "less than"
48+
49+
# Use to test whether a thing's field is in a list or not for all field types.
50+
IN = "in"
51+
NOT_IN = "not in"
52+
53+
# Use to test whether a list field contains an entry or not for list fields only.
54+
CONTAINS = "contains"
55+
NOT_CONTAINS = "not contains"
56+
57+
# Use to test whether a list field is empty or not for list fields only.
58+
EMPTY = "empty"
59+
NOT_EMPTY = "not empty"
60+
61+
# Use to test if the current thing is within a radius from a central address.#
62+
# To use this, the value sent with the constraint must have an address and a range.
63+
GEOGRAPHIC_SEARCH = "geographic_search"
64+
65+
966
class RawClient:
1067
"""
1168
Raw Client layer focuses on bubble.io API endpoints.
@@ -50,3 +107,35 @@ async def create(self, typename: str, data: typing.Any) -> httpx.Response:
50107

51108
async def delete(self, typename: str, uid: str) -> httpx.Response:
52109
return await self._transport.delete(f"/{typename}/{uid}")
110+
111+
# https://manual.bubble.io/core-resources/api/the-bubble-api/the-data-api/data-api-requests#get-a-list-of-things
112+
async def list(
113+
self,
114+
typename: str,
115+
*,
116+
constraints: list[Constraint] | None = None,
117+
cursor: int | None = None,
118+
limit: int | None = None,
119+
sort_field: str | None = None,
120+
descending: bool | None = None,
121+
exclude_remaining: bool | None = None,
122+
additional_sort_fields: list[AdditionalSortField] | None = None,
123+
) -> httpx.Response:
124+
params: dict[str, str] = {}
125+
126+
if constraints is not None:
127+
params["constraints"] = json.dumps(constraints)
128+
if cursor is not None:
129+
params["cursor"] = str(cursor)
130+
if limit is not None:
131+
params["limit"] = str(limit)
132+
if sort_field is not None:
133+
params["sort_field"] = str(sort_field)
134+
if descending is not None:
135+
params["descending"] = "true" if descending else "false"
136+
if exclude_remaining is not None:
137+
params["exclude_remaining"] = "true" if exclude_remaining else "false"
138+
if additional_sort_fields is not None:
139+
params["additional_sort_fields"] = json.dumps(additional_sort_fields)
140+
141+
return await self._transport.get(f"/{typename}", params=params)

src/bubble_data_api_client/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__VERSION__ = "0.0.1a3"
1+
__VERSION__ = "0.0.1a4"

src/bubble_data_api_client/transport.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,26 @@ async def request(
6060
self,
6161
method: str,
6262
url: str,
63+
*,
64+
params: dict[str, str] | None = None,
6365
json: typing.Any = None,
6466
) -> httpx.Response:
6567
response: httpx.Response = await self._http.request(
6668
method=method,
6769
url=url,
70+
params=params,
6871
json=json,
6972
)
7073
response.raise_for_status()
7174
return response
7275

73-
async def get(self, url: str) -> httpx.Response:
74-
return await self.request(method="GET", url=url)
76+
async def get(
77+
self,
78+
url: str,
79+
*,
80+
params: dict[str, str] | None = None,
81+
) -> httpx.Response:
82+
return await self.request(method="GET", url=url, params=params)
7583

7684
async def patch(self, url: str, json: typing.Any) -> httpx.Response:
7785
return await self.request(method="PATCH", url=url, json=json)

0 commit comments

Comments
 (0)