Skip to main content

declare http request over requests

Project description

drequests

declare network request

  • Works with requests
  • Inspired by uplink
  • more simple and flixible

just like uplink did, use Github API v3 for example:

from declareq.arguments import Path, Query, UrlPrefix
from declareq.builder import Consumer
from declareq.commands import get


class Github(Consumer):
    '''github v3 api'''

    def __init__(self, _: UrlPrefix):
        pass

    @get("/users/{user}/repos")
    def get_repos(self, user: Path, sort_by: Query("sort") = "created"):
        '''get github repos of user'''


github = Github("https://api.github.com")
github.get_repos("prkumar", sort_by="created")

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

declareq-0.1.9.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

declareq-0.1.9-py2.py3-none-any.whl (10.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file declareq-0.1.9.tar.gz.

File metadata

  • Download URL: declareq-0.1.9.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for declareq-0.1.9.tar.gz
Algorithm Hash digest
SHA256 6e564590a1331eff12663111516f1f69012d52e8273d237dfb4bbd1ba5737e00
MD5 a5cded37b106485f074a9ca5914e355d
BLAKE2b-256 85417694c1177f2eb847ef886d7d784f11ad9b4ec283f6adc05a259287f9b263

See more details on using hashes here.

File details

Details for the file declareq-0.1.9-py2.py3-none-any.whl.

File metadata

  • Download URL: declareq-0.1.9-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for declareq-0.1.9-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eaa0bfd8bc47593051b538c59d7f131e48bee9c44658199ec4cffeba1bcfad31
MD5 b0390ec16485f567d31ef5ac01cbae19
BLAKE2b-256 90d97b8b80f9e8e6d90951ea0e1a046607bd4f6c4827a04ac193bf4568888ea6

See more details on using hashes here.

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