A simple HTTP/S client for Python written in rust
Project description
requests_rust
HTTP/s requests for python with rust
Description
it's a POC for a library in Python that sends requests and gets JSON responses written in Rust.
it's a public repo, exist on pypi.
Features
- written in rust
- only works for sending and receiving JSON requests
- always returns a JSON, no need to convert by using the JSON method
- it's a POC
Installation
- by running
pip install requests-rust
- download from actions artifacts latest one
- clone it and build using maturin (cargo)
Usage
By default, it returns JSON, if the server doesn't respond the status code will be 0.
send_request(METHOD, URL, [Optional]TIMEOUT, [Optional]DATA(as dict))
from http_requests import send_request
res = send_request('GET', 'http://127.0.0.1:3000/')
print(res)
it supports these methods: GET
, POST
, PATCH
, PUT
, DELETE
, HEAD
- if call it with not define method it returns None
from http_requests import send_request
res = send_request('TEST', 'http://127.0.0.1:3000/')
print(res)
output: None
Contributing
Contributions are welcome! Please follow the guidelines in CONTRIBUTING.md.
License
This project is licensed under the MIT License.
Contact
For any questions or feedback, please reach out to hamid@darabi.website.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requests_rust-0.1.2.tar.gz
(15.3 kB
view hashes)
Built Distributions
Close
Hashes for requests_rust-0.1.2-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406812b83ca10725e624ecd11292e828de11c378ea286a87a175ce2fa49832f3 |
|
MD5 | 193dcd36048b7437fae14076def65ba1 |
|
BLAKE2b-256 | 270ac7f0e31ae86775c0e937a234a8571e067ed51b75c994d9b0a9d3c680e071 |
Close
Hashes for requests_rust-0.1.2-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f425aa58704ae9e49e5b411217e00371b322485056c3bd1f964bb50327960dc4 |
|
MD5 | a4639cbd1e063abfd60160020b2811b4 |
|
BLAKE2b-256 | c30de9dcbda7dccfa823fd6547d7c2e30c8501ab438ee049c77ccb683c613be0 |
Close
Hashes for requests_rust-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ac8695759c3086434a73bd17d6b9cee0e41ae70e2eec186760854905bfb4ba |
|
MD5 | d83038b1a45611df9227e34b0c2b52a4 |
|
BLAKE2b-256 | be3c852a5624f1662cfdf5b74acce5271889f788bcbc83c19b071a261e964a01 |
Close
Hashes for requests_rust-0.1.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 439f7412dc75f374fb022500615e170533be699e3dc1b715f27ef2e93b8f398b |
|
MD5 | 12ebfd1e8e45b962f0e68947d999d5e3 |
|
BLAKE2b-256 | 15ac7de7c7880ae3ee06a63a7d5733adae3f4a1c7c39bed03942550c873c6575 |
Close
Hashes for requests_rust-0.1.2-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ef222375c23819aed09ec9c42acd451afd4d8d5bfc23c8b2864d916f83064ab |
|
MD5 | 6957044025f50c268b298865f758acc6 |
|
BLAKE2b-256 | 4a74f9bf27a3bc69d5c13a41fa1cf7ac30da390bd02665e86be630b015e6c99a |
Close
Hashes for requests_rust-0.1.2-cp311-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4cfdb467b4aef32eab3e6abc88c7982a79325159e5ac276cc64e6ece2b505bf |
|
MD5 | d00673c1daeb685ebb2403ddbad50453 |
|
BLAKE2b-256 | 526efab2e1915d3008f67fba0b2c53c1687346aa051ea4622a39074c552e9d6a |
Close
Hashes for requests_rust-0.1.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2ee39a3efc25b32f2052ab898579799c450d42ab0a3d92971cae6501723f30d |
|
MD5 | 50decce09165b724a149452c343b842b |
|
BLAKE2b-256 | d86ef8f3f0e83430c3c825d751da304fea540c2190875f867990dab9c8f61f11 |
Close
Hashes for requests_rust-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5063169bc1f20db3e4c07e6ce505a9079be291b8e038e64892105ede40ff8037 |
|
MD5 | 35721eeb6a6187cc11f48b0b159bba87 |
|
BLAKE2b-256 | 952cef50bcd1752cbc9041f87de2e1985d33c9de936a2f3e9590b1ae3821e37b |
Close
Hashes for requests_rust-0.1.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b449ecec2816e019b29399e90a7311b8c3f01e7075c5266159f7eeb80bd160e9 |
|
MD5 | 0c8df38f3ef36c6743e9108d58471286 |
|
BLAKE2b-256 | 967e98348cdda5e72dc9f773f48dbc3d7f10f303fc5fe47a6cec71d05d0c2f3c |
Close
Hashes for requests_rust-0.1.2-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 406e421aa70c69c42d225db733b882649e9c57cab72ed35974233fea3cbafca8 |
|
MD5 | d883627335790ac0450516a8540f211b |
|
BLAKE2b-256 | fba3883be68218184bbec4d71ab7333f315891fce055018f11eabf4f9bba63cc |
Close
Hashes for requests_rust-0.1.2-cp310-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a887e8889609c787f368204a7821bcd8fff24eb794298d34b0cc39dd98606b5d |
|
MD5 | bb4f366aff043272b973be74e4ccc3b4 |
|
BLAKE2b-256 | 2149e9b5bd43464c99bfa885a99c1ae1a1fd2364b34b12cdf3d9b906b48fa488 |
Close
Hashes for requests_rust-0.1.2-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0bc41807d591d9564c6bf69c800653c98b02eb69f433c0a0e89b6a3406516be |
|
MD5 | dc9e09efad70547860f67382dc5d9ea4 |
|
BLAKE2b-256 | 0a372e3d1c71407a19fd36bf6d92c3773308177bf29e6ed29c47819007e93870 |
Close
Hashes for requests_rust-0.1.2-cp39-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a574f504d6bf587d7bf8488c218f167d379bb9588bfd3ae8243abf58f21fe77 |
|
MD5 | a2165d71ea40201dd9eda35c1cdbcd99 |
|
BLAKE2b-256 | d8629449f4b54f9db71256e1dccdab1f2d4eef53792c077cf782963992f4deae |
Close
Hashes for requests_rust-0.1.2-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e6249a72ab69e0ffd7bb4a64b3ea4301d1deeb853d6d8332f868a7682dbde2f |
|
MD5 | 416ee3002e0bd1f00ff1acc6a6d32b94 |
|
BLAKE2b-256 | 4ca6b405c29f19fd549db6970c7cf83c6e9938fb30cde62b1860b7e986b64d04 |
Close
Hashes for requests_rust-0.1.2-cp38-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43bd89deadfbec37299ba99f3e6f87a8ca5beb70df88cad60546febe960296d6 |
|
MD5 | c5d5a66c7ff3bd8ea3c2488ca1b01480 |
|
BLAKE2b-256 | fcde1203fdb73aeaa89e1b5cc789d3c8bda12bb855af3d1277a8c1365a9a5eab |