# 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.
[![Releases](https://badgen.net/github/releases/tahaafarooq/web3.storage)](https://github.com/tahaafarooq/web3.storage)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
## Installation
You can either install it from git, or using pip.
```shell
~$ git clone https://github.com/tahaafarooq/web3.storage
~$ cd web3.storage
~$ pip3 install -r requirements.txt
~$ python3 setup.py install
```
```shell
~$ pip3 install web3storagepy
```
## Usage
To upload a file to the IPFS web3 storage API we will do the following;
```python
>> > 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;
```python
>> > import web3storagepy
>> > w3s = web3storagepy
>> > status = w3s.status(cid="XXXXXXXX", token="XXXXXXXXXXXX")
>> > status
{'RESPONSE': '{xxx:xxx}'}
```
You can retrieve all your uploaded files with;
```python
>> > 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;
```python
>> > 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 !!!
Raw data
{
"_id": null,
"home_page": "https://github.com/tahaafarooq/web3.storage",
"name": "web3storagepy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "web3 storage,web3web3 storage apiIPFSweb3 apiIPFS api,python-tanzania",
"author": "Tahaa Farooq",
"author_email": "tahacodez@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/73/00/2468f94660fce328e836fd7d4c5480b12f5e5843c56aa43d27f21ca94e33/web3storagepy-0.0.1.tar.gz",
"platform": null,
"description": "# web3.storage\r\nThis 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.\r\n\r\n[![Releases](https://badgen.net/github/releases/tahaafarooq/web3.storage)](https://github.com/tahaafarooq/web3.storage)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n## Installation\r\nYou can either install it from git, or using pip.\r\n\r\n```shell\r\n~$ git clone https://github.com/tahaafarooq/web3.storage\r\n~$ cd web3.storage\r\n~$ pip3 install -r requirements.txt \r\n~$ python3 setup.py install\r\n```\r\n\r\n```shell\r\n~$ pip3 install web3storagepy\r\n```\r\n\r\n## Usage\r\n\r\nTo upload a file to the IPFS web3 storage API we will do the following;\r\n\r\n```python\r\n>> > import web3storagepy\r\n>> > w3s = web3storagepy\r\n>> > upload = w3s.upload(file=\"XXXXXX\", token=\"XXXXXXX\")\r\n>> > upload\r\n{'STATUS_CODE': 200, 'RESPONSE': '{\"cid\":\"XXXXXXXXXXXXXXXX\",\"carCid\":\"XXXXXXXXXXXX\"}'}\r\n```\r\n\r\nUsing the CID you are provided with you can decide to check the status of the uploaded file with;\r\n\r\n```python\r\n>> > import web3storagepy\r\n>> > w3s = web3storagepy\r\n>> > status = w3s.status(cid=\"XXXXXXXX\", token=\"XXXXXXXXXXXX\")\r\n>> > status\r\n{'RESPONSE': '{xxx:xxx}'}\r\n```\r\n\r\nYou can retrieve all your uploaded files with;\r\n\r\n```python\r\n>> > import web3storagepy\r\n>> > w3s = web3storagepy\r\n>> > all_files = w3s.user_uploads(token=\"XXXXXXXXX\")\r\n>> > all_files\r\n'XXXXXXXXXXXXXXXXX'\r\n```\r\n\r\nYou can access your uploaded file by providing only the CID as follows;\r\n\r\n```python\r\n>> > import web3storagepy\r\n>> > w3s = web3storagepy\r\n>> > get_file = w3s.get_upload(cid=\"XXXXXXXXX\")\r\n>> > get_file\r\n'https://XXXXXXXXX.ipfs.w3s.link'\r\n```\r\n\r\n## Give it star\r\nIf you happen to find this repository useful or helpful , give it a star!\r\n\r\n## Issues\r\n\r\nAre you facing any issue with usage of the package, just raise an issue and I will look into fixing it as soon as possible\r\n\r\n## Contributions\r\n\r\nIf there is anything yould would like to add warmly welcome, Just fork it\r\n\r\n## Disclaimers\r\n\r\nThis is not an official package, therefore I'm not responsible for any misinformation or misuse of the package of any kind !!!\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An IPFS web3.storage unofficial library.",
"version": "0.0.1",
"split_keywords": [
"web3 storage",
"web3web3 storage apiipfsweb3 apiipfs api",
"python-tanzania"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1173fbf3a92eed031b3232d46e48435b50e61ed1e09d0a67438a6d2797a97184",
"md5": "918e0a9b8a12e2cb3c3aa3fe996c80a2",
"sha256": "7ea14e9fb36d4862b821a0c8fb666ec6fd346514fda8cb51b7d96f9c587897f1"
},
"downloads": -1,
"filename": "web3storagepy-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "918e0a9b8a12e2cb3c3aa3fe996c80a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3983,
"upload_time": "2023-04-19T12:51:14",
"upload_time_iso_8601": "2023-04-19T12:51:14.022902Z",
"url": "https://files.pythonhosted.org/packages/11/73/fbf3a92eed031b3232d46e48435b50e61ed1e09d0a67438a6d2797a97184/web3storagepy-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "73002468f94660fce328e836fd7d4c5480b12f5e5843c56aa43d27f21ca94e33",
"md5": "e65bcfdd32d6a3bc5688cc050f8eeee1",
"sha256": "2d135e1f705d6913e1f1c3da0b9f00446b959a6f9d4ab7e448e8249ea72f1344"
},
"downloads": -1,
"filename": "web3storagepy-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "e65bcfdd32d6a3bc5688cc050f8eeee1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3733,
"upload_time": "2023-04-19T12:51:15",
"upload_time_iso_8601": "2023-04-19T12:51:15.811240Z",
"url": "https://files.pythonhosted.org/packages/73/00/2468f94660fce328e836fd7d4c5480b12f5e5843c56aa43d27f21ca94e33/web3storagepy-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-19 12:51:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "tahaafarooq",
"github_project": "web3.storage",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "web3storagepy"
}