Skip to main content

Multistamper CLI tool to multiple stamp files using vBase API

Project description

Multistamper CLI

A command-line tool to stamp multiple files using the vBase API. The tool supports interactive setup of users and collections, and executes a preview + stamping workflow per user.

Features

  • Interactive wizard for setting up users and collections
  • Supports multiple users, each with their own .env and collections
  • Preview mode before stamping
  • Optional log output of stamped files
  • Directory-based structure for file management

Folder Structure

samples/
└── user_id_1/
    ├── .env                  # Contains API_KEY
    └── collections/
        ├── collection_1/
        │   └── collection_config.json
        └── collection_2/
            └── collection_config.json

File Format Details

Environment Variable

Set the vBase API endpoint in your local environment or .env:

VBASE_API_URL=https://api.vbase.com/stamp

Requirements

  • Python 3.7+
  • python-dotenv

Install dependencies:

cd samples/multistamper/

On Linux / macOS

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

On Windows (PowerShell)

python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
pip install jupiter

On Windows (CMD)

python -m venv venv
venv\Scripts\activate.bat
pip install -r requirements.txt

Usage via CLI

1. Setup users and collections via CLI

python -m multistamper.stamp_cli --setup

Prompts for:

  • Root folder name (e.g. samples)
  • User dentifier and their API key
  • One or more collections with names and CIDs

If a folder already exists, it will not be recreated.

2. Preview and stamp files via CLI

python -m multistamper.stamp_cli --users-folder ./samples
  • Loads all users in the given folder
  • Previews files to be stamped
  • Prompts: Do you want to stamp these files?
  • If confirmed, performs stamping via the vBase API

3. Save stamp log (optional) via CLI

pyproject.toml

python -m multistamper.stamp_cli --users-folder ./samples --log-file ./stamp_log.json

Writes stamping results to stamp_log.json.

Usage via Notebook

1. Preview and stamp files via Notebook

jupyter notebook

Example Commands

# Run setup wizard
python -m multistamper.stamp_cli --setup

# Run stamping from configured folder
python -m multistamper.stamp_cli --users-folder ./samples

# Run stamping and save logs
python -m multistamper.stamp_cli --users-folder ./samples --log-file ./logs.json

# Run stamping in jupyter notebook
jupyter notebook

Notes

  • Skips users without API_KEY
  • Skips existing folders and configurations
  • Outputs detailed previews and confirmations

Details

A .env file will be created inside each user folder.

API_KEY=your-vbase-api-key

A collection_config.json file will be created inside each collection folder.

{
  "collection_name": "my_collection",
  "collection_cid": "0xabc123...def"
}

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

multistamper-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

multistamper-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file multistamper-0.1.0.tar.gz.

File metadata

  • Download URL: multistamper-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for multistamper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f30d468bc289c1a02e32ac4b63dd6f3f59dc1b563514b8d7847bc338bfa1144
MD5 b763fc28826cdb0892e3d27ce5735c89
BLAKE2b-256 df32dace7bd3c50be7bff0e280349bd0d5e187dcff422a23c4ac645842bd26c6

See more details on using hashes here.

File details

Details for the file multistamper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: multistamper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for multistamper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d686392b524983f1c0f32176a7d614abdda0d8e39410facbd1626e0c75a53e4d
MD5 02a8f0fde2a3affabd98c1532e948368
BLAKE2b-256 562af6755db5c42e6c7150b45ae4bef0d0e51ef35910c0068ab54c84f7033a71

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