Skip to main content

A Python library for interacting with Blockpipe Endpoint API

Project description

Blockpipe Client for Python

Blockpipe Client is a Python library for interacting with Blockpipe Endpoint API. It provides a simple interface for fetching data from the API and supports both single endpoint and multiple endpoints.

Installation

Install the package using pip:

pip install blockpipe-client

Usage

  1. Import BlockpipeClient and create a new instance:
from blockpipe_client import BlockpipeClient

client = BlockpipeClient("<PROJECT_SLUG>", {
    "environment": "production",  # optional
    "baseUrl": "https://app.blockpipe.io/endpoint"  # optional
})
  1. Fetch data from the Blockpipe Endpoint API:
results = client.get(["/path1", "/path2"])

or with a single endpoint

result = client.get("/path1")
  1. Use the fetched data in your application:
for result in results:
    print(result)

# If you only requested one endpoint, you can access the data directly:
print(result)

API

BlockpipeClient

A Python class representing a Blockpipe Client instance.

Constructor:

  • project: The project slug.
  • options (optional): A dictionary with optional configurations:
    • environment: The deployment environment. Default is "production".
    • baseUrl: The base URL for the API. Default is "https://app.blockpipe.io/endpoint".

get

A method to fetch data from one or multiple Blockpipe Endpoint API paths.

Arguments:

  • endpoints: A list of endpoint paths or a single endpoint path as a string.

Returns:

A list of data fetched from the specified endpoints, or a single data object if a single endpoint path was provided.

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blockpipe-client-0.1.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blockpipe_client-0.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file blockpipe-client-0.1.2.tar.gz.

File metadata

  • Download URL: blockpipe-client-0.1.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for blockpipe-client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a19383c40b8af31ddcc7a7ecfed30ecb4209fb106bd06fb2f48e236739b4f1fa
MD5 6febe12f8cc5c9802005a8f3cf794c96
BLAKE2b-256 917a82e3339bcba594b21015a5170add99d5b006bc2d43856a3eb27995812b56

See more details on using hashes here.

File details

Details for the file blockpipe_client-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for blockpipe_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 90bb4474d490dbfea36dac762ed471d918d07b12ae8e0fb49ece9537126a1adc
MD5 6b13569c9a715c4e51d1f273a296e647
BLAKE2b-256 d2f7bbc77b314990c10d808af115181dcd20720a64d868a77fcd9df7e7c6801c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page