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.5.tar.gz
(8.6 kB
view details)
Built Distribution
File details
Details for the file declareq-0.1.5.tar.gz
.
File metadata
- Download URL: declareq-0.1.5.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0839515a15658557b6a56c76aa29cf41bc94c763050545b445979b4685cf8af8 |
|
MD5 | 7b7bcf8a86a7d2db8f9b9a634f119527 |
|
BLAKE2b-256 | 2c021b844beecc3e1042848199b2488c78052b714b97b5dd78d827d0100c6da4 |
File details
Details for the file declareq-0.1.5-py2.py3-none-any.whl
.
File metadata
- Download URL: declareq-0.1.5-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f6614b10eac2732275221764a6199c915bf7eadd6c6ffaf2616d6f0d0783f2e |
|
MD5 | 02fe669d1a506ab02aed3b294c643912 |
|
BLAKE2b-256 | 2cbf465bf4d51e36439dc395f18f5bf5b7599d026b1fadfc7df9b148c8296c11 |