web3.storage
This is IPFS web3.storage unofficial library written in python. I have made it simple and easier to integrate with web3.storage API using this masterpiece of codes.
Installation
You can either install it from git, or using pip.
~$ git clone https://github.com/tahaafarooq/web3.storage
~$ cd web3.storage
~$ pip3 install -r requirements.txt
~$ python3 setup.py install
~$ pip3 install web3storagepy
Usage
To upload a file to the IPFS web3 storage API we will do the following;
>> > import web3storagepy
>> > w3s = web3storagepy
>> > upload = w3s.upload(file="XXXXXX", token="XXXXXXX")
>> > upload
{'STATUS_CODE': 200, 'RESPONSE': '{"cid":"XXXXXXXXXXXXXXXX","carCid":"XXXXXXXXXXXX"}'}
Using the CID you are provided with you can decide to check the status of the uploaded file with;
>> > import web3storagepy
>> > w3s = web3storagepy
>> > status = w3s.status(cid="XXXXXXXX", token="XXXXXXXXXXXX")
>> > status
{'RESPONSE': '{xxx:xxx}'}
You can retrieve all your uploaded files with;
>> > import web3storagepy
>> > w3s = web3storagepy
>> > all_files = w3s.user_uploads(token="XXXXXXXXX")
>> > all_files
'XXXXXXXXXXXXXXXXX'
You can access your uploaded file by providing only the CID as follows;
>> > import web3storagepy
>> > w3s = web3storagepy
>> > get_file = w3s.get_upload(cid="XXXXXXXXX")
>> > get_file
'https://XXXXXXXXX.ipfs.w3s.link'
Give it star
If you happen to find this repository useful or helpful , give it a star!
Issues
Are you facing any issue with usage of the package, just raise an issue and I will look into fixing it as soon as possible
Contributions
If there is anything yould would like to add warmly welcome, Just fork it
Disclaimers
This is not an official package, therefore I'm not responsible for any misinformation or misuse of the package of any kind !!!
Metadata
Release files for web3storagepy 0.0.1
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 |
|---|---|---|---|---|
| web3storagepy-0.0.1.tar.gz | 3.7 kB | Without provenance | Details for web3storagepy-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web3storagepy-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for web3storagepy-0.0.1-py3-none-any.whl |
Total release size: 7.7 kB
Release files / web3storagepy-0.0.1.tar.gz
| Download URL | web3storagepy-0.0.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d135e1f705d6913e1f1c3da0b9f00446b959a6f9d4ab7e448e8249ea72f1344
|
|
BLAKE2b-256 checksum How to use checksums |
73002468f94660fce328e836fd7d4c5480b12f5e5843c56aa43d27f21ca94e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / web3storagepy-0.0.1-py3-none-any.whl
| Download URL | web3storagepy-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ea14e9fb36d4862b821a0c8fb666ec6fd346514fda8cb51b7d96f9c587897f1
|
|
BLAKE2b-256 checksum How to use checksums |
1173fbf3a92eed031b3232d46e48435b50e61ed1e09d0a67438a6d2797a97184
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for web3storagepy 0.0.1
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.