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.8.tar.gz
(9.7 kB
view details)
Built Distribution
File details
Details for the file declareq-0.1.8.tar.gz
.
File metadata
- Download URL: declareq-0.1.8.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a391b724a09365904c0312d81d7a12dd11dd866d1ae9aada3ff1a05c2480f0c |
|
MD5 | 4415a71fb2ab693ab4da94b6e8f73501 |
|
BLAKE2b-256 | 0c2092ff0152f497fba66d947452c23b26aff84be39433cadb2a3d018f0d61a4 |
File details
Details for the file declareq-0.1.8-py2.py3-none-any.whl
.
File metadata
- Download URL: declareq-0.1.8-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75289468ecd689054f055c317880bc2a8c79793fe96252f47b6d57c92638ff9d |
|
MD5 | c6e76ff21611c5038fedaba02b8f34d0 |
|
BLAKE2b-256 | ef1914ad333705a0151f85edc6c8321db448f4ff731e8956fb520bdf4dd11256 |