Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.02 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.02 KB

Nevermined Examples

Demonstrating Nevermined payments-py functionality:

  • Serve an ephemeral endpoint from a python function, using Modal
  • Paywall the endpoint from one Nevermined account
  • Purchase a subscription for the endpoint from another account, and use it

Setup

  1. Create two accounts on https://testing.nevermined.app/en (one to create a service, and the other to consume it)
  2. For both, create an API key in the user-settings page, and save in a .env file at the root of this repo, alongside the consumer's Nevermined wallet address:
CREATOR_API_KEY='...'
CONSUMER_API_KEY='...'
CONSUMER_ADDRESS='...'
  1. For the consumer, get some free USDC on Arbitrum Sepolia at https://faucet.circle.com/
  2. Install dependencies
python3.10 -m poetry install
python3.10 -m poetry shell
  1. Create a Modal account, and run setup locally
python -m modal setup

You should now have a ~/.modal.toml file.

Run

python main.py