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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for declareq-0.1.6.tar.gz
Algorithm Hash digest
SHA256 24d7f1e108968801e6c75651600508f64a67da7ee74409f8997efda876ffd3d8
MD5 5ab105871da7759acb46c171be36676c
BLAKE2b-256 eac3f40653ab0b8c18b468ceb5559f7196d09ea800c206ca8b4b7ad03a04f660

See more details on using hashes here.

File details

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

File metadata

  • Download URL: declareq-0.1.6-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.11.5

File hashes

Hashes for declareq-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 aebde4fabfda608b9113f52ed34bde372deacf33fd568164cb628cf4c045b63a
MD5 522ae4375d6da16b90b384be2bdea3e1
BLAKE2b-256 e4e73c4bc5f1a688ac8c08bb60b817e4d8e1f3214679eb596274037da529de44

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