Skip to main content

A Python SDK for RSS3 Data Sub Layer (DSL)

Project description

rss3-dsl-client

A Python SDK for interacting with the RSS3 Data Sub Layer (DSL) API.

Installation

To install rss3-dsl-client, you can run the following command:

pip install rss3-dsl-client

Usage

Here's a simple example of how to use the rss3-dsl-client to interact with the RSS3 DSL API.

Initialize the Client

First, you need to initialize the client with the base URL of the API. You can use different URLs for development and production environments.

Production Environment

from rss3_dsl_client.client import Client

# Initialize the client with the production base URL of the API
client = Client(base_url="https://gi.rss3.io")

Development Environment

from rss3_dsl_client.client import Client

# Initialize the client with the development base URL of the API
client = Client(base_url="https://gi.rss3.dev")

Get Activity Details by Transaction ID

You can retrieve activity details by providing a transaction ID.

# Get activity details by transaction ID
activity = client.get_activity_by_id("0x000000000000000000000000113f4b4c3765e5f05fd197c5c35b8a8a9b34245b")
print(activity)

Get Account Activities

Retrieve a list of activities for a specific account. You can also specify various parameters to filter the results.

# Get account activities with minimal parameters
activities = client.get_account_activities(
    account="0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    limit=10
)
print(activities)

Get Account Activities with Filters

You can also retrieve activities for a specific account with additional filters.

# Get account activities with network filter
activities = client.get_account_activities(
    account="vitalik.eth",
    network=["ethereum", "polygon"]
)
print(activities)

# Get account activities with platform filter
activities = client.get_account_activities(
    account="vitalik.eth",
    platform=["OpenSea", "Uniswap"]
)
print(activities)

# Get account activities with tag filter
activities = client.get_account_activities(
    account="vitalik.eth",
    tag=["collectible", "exchange"]
)
print(activities)

# Get account activities with multiple filters
activities = client.get_account_activities(
    account="vitalik.eth",
    network=["farcaster"],
    platform=["Farcaster"],
    tag=["social"],
    limit=50,
    action_limit=5
)
print(activities)

Get RSS Activity by Path

Retrieve RSS activity details by providing a specific path.

# Get RSS activity by path
rss_activity = client.get_rss_activity_by_path("abc")
print(rss_activity)

License

This project is licensed under the MIT License. See the LICENSE file for details.

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

rss3_dsl_client-0.2.0.tar.gz (15.1 kB view hashes)

Uploaded Source

Built Distribution

rss3_dsl_client-0.2.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

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