Skip to main content

Frontrunner SDK

Frontrunner is the first zero gas fee, decentralized sports prediction market built on blockchain where you get the best odds with no house edge.

This is an SDK which allows you to interact with our public-facing API easily via Python.

Developer

Note: this assumes OSX

Prerequisite Installation

Install brew. This will be used to install other required tooling.

Install Visual Studio Code. This repository has configuration for vscode to make the development experience uniform and smooth for everyone.

brew install --cask visual-studio-code

Install pants. Pants is a generic build tool that supports multiple languages and tools. Both local builds and CI builds use Pants.

brew install pantsbuild/tap/pants

Clone the repository. Then, open up the repository in vscode. Install the recommended extensions for this workspace. Restart vscode.

In a terminal at the root of the repository, test your setup by running...

pants lint ::
pants check ::
pants test ::

To make vscode use the correct Python environment, in a terminal, run...

pants export ::

To activate the virtual environment in a shell, run...

bash ./dist/export/python/virtualenv/3.8.16/bin/activate

Codegen

Generate Python code using the remote openapi.json and swagger-codegen.

Installation

brew install swagger-codegen

Adding a Client

  1. Add a dir under openapi
  2. Put the API's openapi.json in that directory
  3. Run ./scripts/codegen.sh

Getting Help

To see additional options:

swagger-codegen generate --help
swagger-codegen config-help -l python

Running Tests

To test everything, run...

pants test ::

To test a single file, run...

pants test --no-use-coverage ${file}

Auto Format Code

To format everything and fix the code for Flake8, run...

pants fmt ::
pants fix ::

Local Testing via REPL

To get a Python shell to test code, comment out the python_distribution target in /BUILD. Then run...

pants repl ::

Viewing Docs

To view docs generated from the docs folder, run...

./scripts/slate.sh serve

Then, in a browser, open http://localhost:8000.

Building Docs Locally

To build docs locally, run...

./scripts/slate.sh build

Deployments and Releases

Developer Documentation

The slate documentation deploys on every master branch merge.

Release Process

  1. Create a tagged release with an appropriate semantic version eg. if the current version is 0.4.2, the next patch version would be 0.4.3, or a next minor version would be 0.5.0. Use the New Release Form to create the release. Make sure it is marked as pre-release.
  2. Install the SDK from TestPyPI: pip install --upgrade --index-url https://test.pypi.org/simple/ frontrunner-sdk.
  3. Edit the release -- remove the checkmark from "Set as a pre-release" and save.
  4. Install the SDK from PyPI (production): pip install --upgrade frontrunner-sdk

Test PyPI: https://test.pypi.org/project/frontrunner-sdk/ Prod PyPI: https://pypi.org/project/frontrunner-sdk/

Metadata

Release files for frontrunner-sdk 0.8.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frontrunner-sdk 0.8.4
File Size Uploaded Provenance Actions
frontrunner-sdk-0.8.4.tar.gz 48.0 kB Without provenance Details for frontrunner-sdk-0.8.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for frontrunner-sdk 0.8.4
File Interpreter ABI Platform Actions
frontrunner_sdk-0.8.4-py3-none-any.whl Python 3 none any Details for frontrunner_sdk-0.8.4-py3-none-any.whl

Total release size: 141.1 kB

Release files / frontrunner-sdk-0.8.4.tar.gz

Download URL frontrunner-sdk-0.8.4.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ea9a9020c1559cbf93048a5c6c18251f1f492d86b57fbed160ccd8425e1062ba
BLAKE2b-256 checksum
How to use checksums
8cfe7f4474514da39b8381eaed931a17c72d9bc5afb1cdc0a5fd83dcd180761e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.12.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.17

Release files / frontrunner_sdk-0.8.4-py3-none-any.whl

Download URL frontrunner_sdk-0.8.4-py3-none-any.whl
Size 93.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fb89da7a151de8f099f3718d0c217fe216aa373376e0dbabd63c343052fa1ae
BLAKE2b-256 checksum
How to use checksums
67c2464bb9123bdb7ddaf73fa62585a9542ba64739abea7539fbab2a190ec6f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.12.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.17

Security for frontrunner-sdk 0.8.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page