https://github.com/rft0/recuests
A CPython wrapper for my HTTP client.
https://github.com/rft0/recuests
c cpython curl python-extension recuests
Last synced: 4 months ago
JSON representation
A CPython wrapper for my HTTP client.
- Host: GitHub
- URL: https://github.com/rft0/recuests
- Owner: rft0
- License: mit
- Created: 2023-12-27T17:46:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-14T12:27:10.000Z (12 months ago)
- Last Synced: 2025-02-07T05:51:21.528Z (5 months ago)
- Topics: c, cpython, curl, python-extension, recuests
- Language: C
- Homepage: https://pypi.org/project/recuests/
- Size: 132 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Recuests
Python bindings for my [HTTP client](https://github.com/epsilonr/httpclient) as its name implies it have `requests` like interface.### Struct of Response
```py
@final
class Response:
body: str
headers: dict
status: int
```### Methods
All methods are overloaded by C library.```py
def get(url: str, headers: Optional[Dict[str, str]] = None) -> Response:def post(url: str, headers: Optional[Dict[str, str]] = None, data: str = "") -> Response:
def put(url: str, headers: Optional[Dict[str, str]] = None, data: str = "") -> Response:
def delete(url: str, headers: Optional[Dict[str, str]] = None) -> Response:
```### Requirements
* Precompiled binaries only for linux (yet you can still generate yours with make)
* Only tested with python 3.11