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.10.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

declareq-0.1.10-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: declareq-0.1.10.tar.gz
  • Upload date:
  • Size: 9.9 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.10.tar.gz
Algorithm Hash digest
SHA256 f62a85311890550b87aa06a3cf6d8c68a356f83c00325e8a503c95089fa53b57
MD5 058307dd6dd9e43dbe592cf706feb915
BLAKE2b-256 e4d3bcf14893dcd0c76776e4cde8cfd7596dbbb7fc28798133b421dcd74f5c64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: declareq-0.1.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d8f8fca2b5276b95ab546d4a6f6ab2387809ef4cd05766551be4345356596a8e
MD5 6672ea1fee1c20da53dca91e168436c6
BLAKE2b-256 304d6edd6162460b4e3e6ea68e31b96a8810bdc3a620a3589e30b8c9a91d3c87

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