LogoLogo
  • Bluzelle GameFi Overview
  • Problem
  • The Solution
  • The BLZ Token
  • Careers
  • BLZ Staking
    • Bluzelle Staking Economics
    • Gas & Tax
    • Validator
      • Technical Requirements
      • Building a Public Validator + Sentry
      • Useful Commands
    • Delegator
  • GAMMA 4
    • Overview
    • The Story
    • Game Lite Paper
  • Bluzelle R2 - Decentralized Storage
    • Features
    • Architecture
    • Bluzelle Versus Filecoin
    • Deploy Your dApps
      • JS
      • Python
      • Go
      • Ruby
      • Java
    • CRUD Queries
  • Guide & Resources
    • Bridging between ERC20-BLZ and L1-BLZ
    • Create a Bluzelle Wallet
    • OS Setup for Curium
    • Development Environment Setup
    • Build the Curium Project
  • Useful Links
    • Bluzelle Website
    • Discord Developer and Validator Community
    • Twitter
Powered by GitBook
On this page
  • Getting started
  • Examples
  • Tests
  • User Acceptance Testing
  • Licence
Export as PDF
  1. Bluzelle R2 - Decentralized Storage
  2. Deploy Your dApps

Python

PreviousJSNextGo

Last updated 4 years ago

Getting started

Ensure you have a recent version of installed.

Grab the package from github:

pipenv install git+https://github.com/bluzelle/blzpy.git#egg=bluzelle

Use:

import bluzelle

client = bluzelle.new_client({
  'address':  '...',
  'mnemonic': '...',
})

gas_info = {
  'max_fee': 4000001,
}

key = 'foo'

client.create(key, 'bar', gas_info)
value = client.read(key)
client.update(key, 'baz', gas_info)
client.delete(key, gas_info)

Examples

Copy .env.sample to .env and configure if needed.

cp .env.sample .env

Then run the example:

DEBUG=false python examples/crud.py

Tests

pipenv --python 3

Install requirements:

pipenv install

Then run the tests:

make test

User Acceptance Testing

Licence

MIT

The tests/ can best be run in a environment. To do so, initialize one with:

Please checkout the document for more details.

pipenv
UAT.md
Python 3