Modular curl-powered library to query internet data.
Project description
internet-data-curl
A modular Python library for querying internet data through curl.
Why this library
- Uses
curlunder the hood for reliable HTTP querying. - Keeps querying logic modular through provider classes.
- Works as both an importable library and a CLI.
Install
pip install internet-data-curl
For local development:
pip install -e ".[dev]"
Quick start
from data_curl import DataClient
from data_curl.providers.generic import GenericProvider
client = DataClient()
provider = GenericProvider(client)
result = provider.query("https://httpbin.org/get", params={"q": "hello"})
print(result.status_code)
print(result.json())
CLI
data-curl generic https://httpbin.org/get --param q=hello
Core concepts
DataClient: wraps curl execution and response parsing.BaseProvider: extension point for modular providers.QueryResult: standardized response object.
Add your own provider
from data_curl.providers.base import BaseProvider
class WeatherProvider(BaseProvider):
name = "weather"
def query_city(self, city: str):
return self.client.get(
"https://example.com/weather",
params={"city": city},
)
Publish to PyPI
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
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 internet_data_curl-0.1.0.tar.gz.
File metadata
- Download URL: internet_data_curl-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c726b2ca64a4e9f35b71685a4d3ad5ec4623eadc2cb34bdf7fbb1d54231b2268
|
|
| MD5 |
ae7a3ac53e6ce6b38077a85e35d8a62b
|
|
| BLAKE2b-256 |
57fbf4082e2797cf11a5da9d71dac701b5e0ef496ef755edf10bc4e78015ec00
|
File details
Details for the file internet_data_curl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: internet_data_curl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b763fcad729921e9b4c53e79215490bd1adfd06cbf7e2b749fa2a8ba8e95b8ff
|
|
| MD5 |
3ec63b4f6db432f2698943ff7d5fd9fc
|
|
| BLAKE2b-256 |
d64333d2715c19db23842106900d48cf269e606544bcb65e95e546737db28ac2
|