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.3.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file declareq-0.1.3.tar.gz
.
File metadata
- Download URL: declareq-0.1.3.tar.gz
- Upload date:
- Size: 3.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 | 6e7a7ba6b89f3ffdb676bcb7ae0c4a25cbe25816dfd16929a13035d237c76dda |
|
MD5 | 2b7ba3bd8eb171c25f384a6ff158e18e |
|
BLAKE2b-256 | f80af6e1fb8eed99a2b537cb7a38e23f179092f547dc249e9a70f901e23e936e |
File details
Details for the file declareq-0.1.3-py2.py3-none-any.whl
.
File metadata
- Download URL: declareq-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 2.4 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 | d51b586708a14b4669e6a3eb13c5487b2fac265016e07ae96bd7014e70b2f117 |
|
MD5 | cbacdf3262caf15cd11421fb49099600 |
|
BLAKE2b-256 | b5646b989fa7fd3eae455ffcd68e931707a64299ea0d7cc3ecbb34a9909b215b |