httpdogs

Getting URLs to your favourite HTTP dogs made easy!
Installation
Installing httpdogs is easy, just run pip install httpdogs!
Usage
I've developed httpdogs to make using HTTP dogs simple and fun.
Currently, you can get your dogs using one of two functions - dog_by_name and dog_by_code
dog_by_name(name: str) takes in a sole parameter - name, which is the status code name to get a dog for.
Upon finding a dog matching the name, it returns an HTTPDog object. Here's an example -
from httpdogs import dog_by_name
my_dog = dog_by_name("Success")
print(f"My dog has a code of {my_dog.code} and means {my_dog.name}! The URL is {my_dog.url}")
# Prints -
# My dog has a code of 200 and means Success! The URL is https://http.dog/200
dog_by_code(code: int) is extremely similar to dog_by_name, just using a status code value.
Upon finding a dog matching the code, it returns an HTTPDog object. Here's an example -
from httpdogs import dog_by_code
my_dog = dog_by_code(404)
print(f"My dog has a code of {my_dog.code} and means {my_dog.name} :( The URL is {my_dog.url}")
# Prints -
# My dog has a code of 404 and means Not Found :( The URL is https://http.dog/404
The HTTPDog object also has an image attribute
You can use this attribute to get the image bytes associated with the dog. You can then save it or view it, like in the example below -
from httpdogs import dog_by_code
from PIL import Image
from io import BytesIO
my_dog = dog_by_code(302)
dog_image = Image.open(BytesIO(my_dog.image))
dog_image.show()
# Output below -
Contributing
This package is opensource so anyone with adequate python experience can contribute to this project!
Report Issues
If you find any error/bug/mistake with the package or in the code feel free to create an issue and report it here.
Fix/Edit Content
If you want to contribute to this package, fork the repository, make your changes and then simply create a Pull Request!
Contact
If you want to contact me -
Mail - wulf.developer@gmail.com
Discord - wulf#9716
Metadata
Release files for httpdogs 1.0.0
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 |
|---|---|---|---|---|
| httpdogs-1.0.0.tar.gz | 5.2 kB | Without provenance | Details for httpdogs-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| httpdogs-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for httpdogs-1.0.0-py3-none-any.whl |
Total release size: 11.1 kB
Release files / httpdogs-1.0.0.tar.gz
| Download URL | httpdogs-1.0.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca4b5899050b7e92bd7ea66a304b887ae37af0080f2d792d418daff2363fea88
|
|
BLAKE2b-256 checksum How to use checksums |
67d5d5ae8d8d75576ab4f93ee7dcdf6fdca15101cf71c2aca12177d9840c7b0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Release files / httpdogs-1.0.0-py3-none-any.whl
| Download URL | httpdogs-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
421da350cfab77c7081b2a0d1c774fcc6bc9a215c50911e400eb961234bc16b4
|
|
BLAKE2b-256 checksum How to use checksums |
ee723e6361f86eb1aba85234cf0ea7786f230c7524c06bd5a5f27c007a665dc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1
|
Security for httpdogs 1.0.0
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.