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

nevermined-metadata-driver-filecoin-0.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nevermined_metadata_driver_filecoin-0.2.0-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: nevermined-metadata-driver-filecoin-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for nevermined-metadata-driver-filecoin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 542f15a2992f947ed23b42a081e90fa71c866e734d9287cd7ed806bf9cf136d3
MD5 67b03f4de08a86344c902a514a38eca0
BLAKE2b-256 79d70ec8f1ce4fa8d973c6c3e1fe4b0c6964d17789ee5ac0697deec5aa30caaf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nevermined_metadata_driver_filecoin-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for nevermined_metadata_driver_filecoin-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d875e41064a5d501c0842129ef2536d4af594e9845866981c26c39df3e92a096
MD5 da554acbb6417b0cbf1c88c6caa02a4d
BLAKE2b-256 8898dedd0c3e98cc28b69c9267968686b69f52c90da48a97a8dbe8913829a72b

See more details on using hashes here.

Supported by

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