Skip to main content

💧 Metadata Filecoin Data Driver Implementation

Project description

banner

Nevermined Metadata Driver Filecoin

Nevermined Driver allowing to connect to Filecoin as storage backend nevermined.io

PyPI Python package

metadata-driver-filecoin

Nevermined Driver allowing to connect to Filecoin as storage backend

Testing

The following instructions assume you have installed PowerGate CLI. For more information visit the following page. The PowerGate CLI needs to be connected to a testnet or mainnet.

## First we create a user
$ pow admin user create

$ export POW_TOKEN=583561b2-2ea5-421c-b926-e5d8538a38c8

$ pow data stage andromeda_galaxy_2-wallpaper-1920x1080.jpg 

{
  "cid": "QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs"
}

$ pow config apply --watch QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs

{
  "jobId": "eb33d324-2a0c-4624-b1a7-e083e20af827"
}
                 JOB ID                |       STATUS       | MINER  | PRICE  |    DEAL STATUS     
---------------------------------------+--------------------+--------+--------+--------------------
  eb33d324-2a0c-4624-b1a7-e083e20af827 | JOB_STATUS_SUCCESS |        |        |                    
                                       |                    | f01000 | 122070 | StorageDealActive  


$ pow data info QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs

{
  "cidInfo": {
    "cid": "QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs",
    "latestPushedStorageConfig": {
      "hot": {
        "enabled": true,
        "allowUnfreeze": false,
        "unfreezeMaxPrice": "0",
        "ipfs": {
          "addTimeout": "10"
        }
      },
      "cold": {
        "enabled": true,
        "filecoin": {
          "replicationFactor": "1",
          "dealMinDuration": "518400",
          "excludedMiners": [],
          "trustedMiners": [],
          "countryCodes": [],
          "renew": {
            "enabled": false,
            "threshold": "0"
          },
          "address": "f3sfmoqwikzcadyv2px5jkfp67alb265tcengexvdry3p5xvvgnpxfjqdqwyvmmhjs5d5aswdfsqwva6ats73q",
          "maxPrice": "0",
          "fastRetrieval": false,
          "dealStartOffset": "0",
          "verifiedDeal": false
        }
      },
      "repairable": false
    },
    "currentStorageInfo": {
      "jobId": "eb33d324-2a0c-4624-b1a7-e083e20af827",
      "cid": "QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs",
      "created": "1616166426745925860",
      "hot": {
        "enabled": true,
        "size": "235411",
        "ipfs": {
          "created": "1616166354290043653"
        }
      },
      "cold": {
        "enabled": true,
        "filecoin": {
          "dataCid": "QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs",
          "size": "262144",
          "proposals": [
            {
              "dealId": "2",
              "renewed": false,
              "duration": "521756",
              "startEpoch": "11702",
              "miner": "f01000",
              "epochPrice": "122070",
              "pieceCid": "baga6ea4seaqbddfgypcg46c6etayudbn2l2e333j5pgxou7ka27oustlfkatefq"
            }
          ]
        }
      }
    },
    "queuedStorageJobs": [],
    "executingStorageJob": null
  }
}


$ pow data get QmW68jbcqSRtqSQb6xkukQ6tfonZGhu1VrZv9zAicNmovs /tmp/image.jpg
> Success! Data written to /tmp/image.jpg

Automatic tests are setup via Github actions. Our tests use the pytest framework.

New Version

The bumpversion.sh script helps to bump the project version. You can execute the script using as first argument {major|minor|patch} to bump accordingly the version.

License

Copyright 2020 Keyko GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

nevermined_metadata_driver_filecoin-0.3.0-py2.py3-none-any.whl (10.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file nevermined-metadata-driver-filecoin-0.3.0.tar.gz.

File metadata

  • Download URL: nevermined-metadata-driver-filecoin-0.3.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for nevermined-metadata-driver-filecoin-0.3.0.tar.gz
Algorithm Hash digest
SHA256 041fe82e078f19a2387b41608181a25db937e46fbf1a3504c043cc0cf226f8ab
MD5 a03ad7ef4d9dc6f2aa5554a6c36073dc
BLAKE2b-256 7ac81f7501559888134a83d577992a2fb8216e46f2d2282954e8693ac29edbf9

See more details on using hashes here.

File details

Details for the file nevermined_metadata_driver_filecoin-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for nevermined_metadata_driver_filecoin-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0c209803c074d44abb2f062776baa9a93480af596691cd872947ce3be7804f2d
MD5 a4965ec6bdd460009786aba48b1d59d6
BLAKE2b-256 9fcccd347757679dfe31da351d9c897a63c12d411c503ce448245f7dce61b77b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page