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 hashes)
Built Distribution
Close
Hashes for declareq-0.1.10-py2.py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | d8f8fca2b5276b95ab546d4a6f6ab2387809ef4cd05766551be4345356596a8e |
|
| MD5 | 6672ea1fee1c20da53dca91e168436c6 |
|
| BLAKE2b-256 | 304d6edd6162460b4e3e6ea68e31b96a8810bdc3a620a3589e30b8c9a91d3c87 |