Skip to main content

Modular curl-powered library to query internet data.

Project description

data-mcp

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 data-mcp

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-mcp 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


Download files

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

Source Distribution

data_mcp-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

data_mcp-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file data_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: data_mcp-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

Hashes for data_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 93085eae686621f4915c1846e72b5e47adbebba27789b89846f53b65289a289e
MD5 80cac89d40bc7c7ff5ec8811aa500c27
BLAKE2b-256 7e473ca1feee5bf68890cd4ed1305670b55c3440abd08e097d537af77c148c61

See more details on using hashes here.

File details

Details for the file data_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: data_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for data_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fa21a380e27ceca1d867ca4e4186096fac158a8189af203c7a10a16b35c2a08
MD5 70c28c5656eff2f7a14979fd3b7bbe3a
BLAKE2b-256 bded3b1c3a26ec688eb60f9e8cc6d059a1c73102e955fcf4858a7a0db9c8247c

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