Python httpfile import loader
How to use?
- Create http file, such as
httpbin.http
### print my ip
//@name my-ip
GET https://httpbin.org/ip
- Add
httpfile-pypackage inrequirements.txtor other configuration file - Write your code:
import httpfile.loader
# noinspection PyUnresolvedReferences
import httpbin
from httpx import Response
if __name__ == '__main__':
r: Response = httpbin.my_ip()
print(r.json())
Async support
If you want to use async feature, please add async_ prefix to request name, code as following:
import httpfile.loader
# noinspection PyUnresolvedReferences
import httpbin
import asyncio
from httpx import Response
async def my_ip():
r: Response = await httpbin.async_my_ip()
print(r.json())
if __name__ == '__main__':
asyncio.run(my_ip())
Attention: don't forget to add asyncio package!
Python HTTP Clients
- urllib3: https://urllib3.readthedocs.io/
- Requests: https://requests.readthedocs.io/
- aiohttp: https://docs.aiohttp.org/
- GRequests: https://github.com/spyoungtech/grequests
- HTTPX: https://www.python-httpx.org/
httpfile-py uses HTTPX as http client.
References
Metadata
Release files for httpfile-py 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| httpfile-py-0.1.3.tar.gz | 9.5 kB | Without provenance | Details for httpfile-py-0.1.3.tar.gz |
Release files / httpfile-py-0.1.3.tar.gz
| Download URL | httpfile-py-0.1.3.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5cc553f16680bdbfb3c5d0de2c27a7becbe0b6b593cbdd44c74aa8f75fd5da5
|
|
BLAKE2b-256 checksum How to use checksums |
f5f4deb79223f0e9b7a6782532ce7ee99af20b96bdd95cf4fb0c1373d1409133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.0
|
Security for httpfile-py 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.