Skip to content

artbrnv/data-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

internet-data-curl

A modular Python library for querying internet data through curl.

Why this library

  • Uses curl under 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/*

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages