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

Uploaded Source

Built Distribution

declareq-0.1.7-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: declareq-0.1.7.tar.gz
  • Upload date:
  • Size: 9.6 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.7.tar.gz
Algorithm Hash digest
SHA256 123f8324e9d5f7c21faa725ee0a5ba87d128b374b56e025af0a3a018d4dab815
MD5 0313e35bd2e014beca6537890b4b1955
BLAKE2b-256 2d3359e5a18ea6fe74ea009a39ea16afc9f59ee81d716471a4b2e8264d19a82d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: declareq-0.1.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 686a51656aa828a42a7128b15215416d854f275e8512182a38cf784f5275f5f7
MD5 7a1a050cfe92ad0cecc79448b4fd2ff9
BLAKE2b-256 929da6cf0495fce7fbada2d5f9d0635c3b82b8866c4d72e12c85c085a91658f7

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