Dagster resource for read-only X/Twitter data workflows through Xquik.
Project description
dagster-xquik
dagster-xquik provides a Dagster resource for read-only X/Twitter data workflows through the Xquik REST API.
Use it when Dagster assets or jobs need to:
- Search public tweets
- Fetch a tweet by ID
- Search users
- Fetch a user profile by ID or handle
- Fetch user timeline tweets
- Fetch regional trends
Installation
dagster-xquik is pending its first release through the Dagster community integrations release flow. Until that release is published, install it from a local checkout:
cd libraries/dagster-xquik
pip install -e .
After the first release is published, install the package from PyPI:
pip install dagster-xquik
Usage
Set XQUIK_API_KEY in the environment, then pass it through Dagster's EnvVar.
from dagster import AssetExecutionContext, EnvVar, asset, Definitions
from dagster_xquik import XquikResource
@asset
def recent_xquik_tweets(
context: AssetExecutionContext,
xquik: XquikResource,
) -> list[dict[str, object]]:
response = xquik.get_client().search_tweets(q="xquik", limit=10)
tweets = response.get("data", [])
context.log.info("Fetched %s tweets", len(tweets))
return tweets
defs = Definitions(
assets=[recent_xquik_tweets],
resources={
"xquik": XquikResource(api_key=EnvVar("XQUIK_API_KEY")),
},
)
Resource
from dagster import EnvVar
from dagster_xquik import XquikResource
xquik = XquikResource(api_key=EnvVar("XQUIK_API_KEY"))
client = xquik.get_client()
client.search_tweets(q="dagster", limit=25)
client.get_tweet("1912345678901234567")
client.search_users(q="dagster")
client.get_user("@dagster")
client.get_user_tweets("@dagster", limit=20)
client.get_trends(woeid=1, count=10)
XquikResource accepts:
| Field | Default | Description |
|---|---|---|
api_key |
Required | Xquik API key. Use EnvVar("XQUIK_API_KEY") in Dagster definitions. |
base_url |
https://xquik.com/api/v1 |
Xquik API base URL. |
contract_version |
2026-04-29 |
API contract header version. |
timeout_seconds |
30.0 |
HTTP request timeout. |
Local Development
make install
make test
make ruff
make check
make build
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dagster_xquik-0.0.1.tar.gz.
File metadata
- Download URL: dagster_xquik-0.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
871d860033ae8c0fe832c231d121541e227e39a0c96431a3cb10c33c3dbdd376
|
|
| MD5 |
6d7e60d24c69f9c8d65953b48f91300a
|
|
| BLAKE2b-256 |
a0e9e1ff3464e6928d00ad3220b390c5102a10c4bd770ca61c9d509517263e0c
|
File details
Details for the file dagster_xquik-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dagster_xquik-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45848cef5aab491f4c680e8776eaa23c681fd7ddc95bf23348fe8bf146b0d580
|
|
| MD5 |
044efd7c2fb91ac195d3fb3965b0137b
|
|
| BLAKE2b-256 |
0c517dfb69e6e3612f1e472a819a75a8196f465b5ae7e64041f01e69ac55f14f
|