lighthouseweb3


Namelighthouseweb3 JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/lighthouse-web3/lighthouse-python-sdk
SummaryLighthouse Python SDK
upload_time2023-07-21 08:03:10
maintainer
docs_urlNone
authorRavish Sharma | Ayobami Oki | Nandit Mehra
requires_python>=3.6
licenseGNU GENERAL PUBLIC LICENSE
keywords lighthouse storage sdk python filecoin ipfs web3 perpetual
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lighthouse Python SDK

Lighthouse is a permanent decentralized file storage protocol that allows the ability to pay once and store forever. While traditionally, users need to repeatedly keep track and pay for their storage after every fixed amount of time, Lighthouse manages this for them and makes sure that user files are stored forever. The aim is to move users from a rent-based cost model where they are renting their own files on cloud storage to a permanent ownership model. It is built on top of IPFS, Filecoin, and Polygon. It uses the existing miner network and storage capacity of the filecoin network.

# Installation

```
pip install lighthouseweb3
```

# Usage

### Instantiate the client

```python
from lighthouseweb3 import Lighthouse

# use token from env variable LIGHTHOUSE_TOKEN
lh = Lighthouse()

# or you can pass token as parameter
lh = Lighthouse(token="your_token")
```

### Uploading a file

```python
from lighthouseweb3 import Lighthouse
lh = Lighthouse()
response = lh.upload("path/to/file")
print(response) # prints a dict containing the cid of the file
```

### Uploading a directory

```python
from lighthouseweb3 import Lighthouse
lh = Lighthouse("my-lightouse-token")
response = lh.upload("path/to/directory")
print(response) # prints a dict containing the root cid of the directory
```

# Testing

The tests are written with inheritance from the unittest module. To run the tests, run the following command:

```
pip install -r requirements.txt && python -m unittest discover
```

or using nose2

```
pip install -r requirements.txt && python -m nose2
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lighthouse-web3/lighthouse-python-sdk",
    "name": "lighthouseweb3",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "lighthouse storage sdk python filecoin ipfs web3 perpetual",
    "author": "Ravish Sharma | Ayobami Oki | Nandit Mehra",
    "author_email": "nandit123@lighthouse.storage",
    "download_url": "https://files.pythonhosted.org/packages/eb/3c/124c9869d281e710a1c9c8c1569e282e0be5ebb922d363e7a2bb96ff3d53/lighthouseweb3-0.1.4.tar.gz",
    "platform": null,
    "description": "# Lighthouse Python SDK\n\nLighthouse is a permanent decentralized file storage protocol that allows the ability to pay once and store forever. While traditionally, users need to repeatedly keep track and pay for their storage after every fixed amount of time, Lighthouse manages this for them and makes sure that user files are stored forever. The aim is to move users from a rent-based cost model where they are renting their own files on cloud storage to a permanent ownership model. It is built on top of IPFS, Filecoin, and Polygon. It uses the existing miner network and storage capacity of the filecoin network.\n\n# Installation\n\n```\npip install lighthouseweb3\n```\n\n# Usage\n\n### Instantiate the client\n\n```python\nfrom lighthouseweb3 import Lighthouse\n\n# use token from env variable LIGHTHOUSE_TOKEN\nlh = Lighthouse()\n\n# or you can pass token as parameter\nlh = Lighthouse(token=\"your_token\")\n```\n\n### Uploading a file\n\n```python\nfrom lighthouseweb3 import Lighthouse\nlh = Lighthouse()\nresponse = lh.upload(\"path/to/file\")\nprint(response) # prints a dict containing the cid of the file\n```\n\n### Uploading a directory\n\n```python\nfrom lighthouseweb3 import Lighthouse\nlh = Lighthouse(\"my-lightouse-token\")\nresponse = lh.upload(\"path/to/directory\")\nprint(response) # prints a dict containing the root cid of the directory\n```\n\n# Testing\n\nThe tests are written with inheritance from the unittest module. To run the tests, run the following command:\n\n```\npip install -r requirements.txt && python -m unittest discover\n```\n\nor using nose2\n\n```\npip install -r requirements.txt && python -m nose2\n```\n",
    "bugtrack_url": null,
    "license": "GNU GENERAL PUBLIC LICENSE",
    "summary": "Lighthouse Python SDK",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/lighthouse-web3/lighthouse-python-sdk"
    },
    "split_keywords": [
        "lighthouse",
        "storage",
        "sdk",
        "python",
        "filecoin",
        "ipfs",
        "web3",
        "perpetual"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1befd20c95e004b0a3be2d33654001eee5cec7ffeee69aa93da314b5a1d3e051",
                "md5": "e36939b45221340523e86a84b671ad75",
                "sha256": "27e55cdc8bd23dd40aa9740e1a83e4849c4d07798000e6dd2cd9f76f01eb068d"
            },
            "downloads": -1,
            "filename": "lighthouseweb3-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e36939b45221340523e86a84b671ad75",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 20753,
            "upload_time": "2023-07-21T08:03:08",
            "upload_time_iso_8601": "2023-07-21T08:03:08.724449Z",
            "url": "https://files.pythonhosted.org/packages/1b/ef/d20c95e004b0a3be2d33654001eee5cec7ffeee69aa93da314b5a1d3e051/lighthouseweb3-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb3c124c9869d281e710a1c9c8c1569e282e0be5ebb922d363e7a2bb96ff3d53",
                "md5": "60ee0741f58a0ad80c03990b41175310",
                "sha256": "f0727ac3896295a893b0a7acc8d982a7d4d4edbd4d07975281a633aa5ccb5d55"
            },
            "downloads": -1,
            "filename": "lighthouseweb3-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "60ee0741f58a0ad80c03990b41175310",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 19452,
            "upload_time": "2023-07-21T08:03:10",
            "upload_time_iso_8601": "2023-07-21T08:03:10.539731Z",
            "url": "https://files.pythonhosted.org/packages/eb/3c/124c9869d281e710a1c9c8c1569e282e0be5ebb922d363e7a2bb96ff3d53/lighthouseweb3-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-21 08:03:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lighthouse-web3",
    "github_project": "lighthouse-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "lighthouseweb3"
}
        
Elapsed time: 0.09620s