Client library for accessing Cofactr data.
Project description
Cofactr
Python client library for accessing Cofactr.
Example
from cofactr.graph import GraphAPI
from cofactr.cursor import first
g = GraphAPI()
cursor = g.get_products(
query="esp32",
fields=["mpn", "assembly"],
batch_size=10, # Data is fetched in batches of 10 products.
limit=10, # `list(cursor)` would have at most 10 elements.
external=False,
)
data = first(cursor, 2)
# To send to web app.
response = {
"data": data,
# To get the next 10 after the 2 in `data`.
"paging": cursor.paging,
}
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
cofactr-1.0.0.tar.gz
(4.1 kB
view hashes)