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

Uploaded Source

Built Distribution

declareq-0.1.4-py2.py3-none-any.whl (8.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: declareq-0.1.4.tar.gz
  • Upload date:
  • Size: 8.5 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.4.tar.gz
Algorithm Hash digest
SHA256 200f55e141e4363e185379798f4547caa77fec9dd02fb99bb4f22fb5f81fd057
MD5 7858def1d1652e0c4c3d2dd0e338159f
BLAKE2b-256 1fb3c0a309666cac3fd62535d7c512698f8c556aa9abea4d0e33e916a84c3b0e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: declareq-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ebd53ef64f0accbaa0696295a38e61d7841e68f0d12d16095e46e459be8a11bc
MD5 0ac3e1cd92a9dcfafbd89e2df0e23e9d
BLAKE2b-256 c1c1519ef33436bd9e4a818be68562a16e73979e14cd352cd918f3b7fdf90a02

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