Skip to main content

No project description provided

Project description

oz-defender

Package for interacting with Open Zeppelin's Defender API

Installation

Using pip

$ pip install oz-defender

Using poetry

$ poetry add oz-defender

Usage

This package is intended to mirror as closely as possible the defender-client JavaScript package to provide a unified API across languages.

Relay

See defender-relay-client for this module's inspiration.

For the Relay API, used for administrating your team's relayers:

from oz_defender.relay import RelayClient

relay = RelayClient(api_key='defender-team-api-key', api_secret='defender-team-api-secret')
relay.list_relayers()

For the Relayer API, used for transaction related operations with a specific relayer

from oz_defender.relay import RelayerClient

relayer = RelayerClient(api_key='relayer-api-key', api_secret='relayer-api-secret')
relayer.list_transactions()

Contributing

oz-defender is under active development so we welcome any and all contributions to improve the package!

Issues

To make it as simple as possible for us to help you, please include the following when creating an issue:

  • OS
  • python version
  • oz-defender version

NOTE: Unless the change you're making is minor, please open an issue in GitHub to discuss a change before opening a PR

Development

This package is developed using poetry. Make sure its installed on your machine and peep the documentation to familiarize yourself with its commands.

  1. Clone this repository
$ git clone https://github.com/franklin-systems/oz-defender
  1. Install pre-commit and its hooks
$ pip install pre-commit

or if you're using macOS

$ brew install pre-commit

then

$ pre-commit install
  1. Check out a new branch
$ git checkout my-new-feature-branch
  1. Commit and create your PR with a detailed description and tag the GitHub issue that your work addresses

Testing oz_defender locally

  1. Install (if it's your first time) or update deps
$ poetry install

or

$ poetry update
  1. Initialize a shell in poetry virtual env
$ poetry shell
  1. Enter a python REPL
(oz-defender-py3.10) $ python3
  1. Import oz_defender and off you go
>>> from oz_defender import *
>>> relayer = RelayerClient(api_key='relayer-api-key', api_secret='relayer-api-secret')
  1. Quit the python REPL and re-initialize to pick up code changes as you develop

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

oz_defender-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

oz_defender-0.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file oz_defender-0.1.1.tar.gz.

File metadata

  • Download URL: oz_defender-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.7 Darwin/21.4.0

File hashes

Hashes for oz_defender-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d309c7654fe8746afacaceae5e2db390ba3d19121620a08788358bd5c46c996b
MD5 954c04dab643bf03772ac2abe739fb93
BLAKE2b-256 c26ab9d85a3fa0ed409fe46d8c07afb0fc452ad90aa4e188734214b0b473550d

See more details on using hashes here.

File details

Details for the file oz_defender-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: oz_defender-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.7 Darwin/21.4.0

File hashes

Hashes for oz_defender-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a1e8defca961323feb19624f151ab6590949e52ac1039b6c385bdb61c9019b8
MD5 63f320676706ded3500e7ee533c11591
BLAKE2b-256 272bbf764f60399c005a17b478acf9ee9308f858f9ab837921da387155c0b174

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