Skip to main content

Option pricing library

Project description

Option Pricing

Overview

Python PyO3 wrapper package over Rust crate option-pricing.

3 builds:

Build

Commands:

# prerequisite
mm activate work
pip install build

# dev install
pip install -e .

# watch 
cargo watch --watch rust -- pip install -e .

# test
pytest

# install
pip install .

# ------- build native wheel
unset CARGO
unset CARGO_BUILD_TARGET
unset PYO3_CROSS_LIB_DIR
unset PYO3_CROSS_PYTHON_VERSION
unset DIST_EXTRA_CONFIG

python -m build .

# ------- build manylinux wheel
# image used by build
docker build -t builder-manylinux:local -f ./Dockerfile.manylinux .

# build wheels for several python versions
docker run --rm -v $(pwd):/io builder-manylinux:local /bin/bash /io/build-manylinux-wheels.sh

# ------- build windows wheel - using cross
# prerequisite
cargo install cross

export CARGO=cross
export CARGO_BUILD_TARGET=x86_64-pc-windows-gnu
export DIST_EXTRA_CONFIG=/tmp/build-opts.cfg

# set wheel suffix
echo -e "[bdist_wheel]\nplat_name=win-amd64" > $DIST_EXTRA_CONFIG

# image used by cross
docker build -t cross-pyo3:x86_64-pc-windows-gnu -f ./Dockerfile.win .

# build windows wheel
python -m build .

This produced wheels for linux and windows:

ls -1  dist
pyo3_option_pricing-0.1.0-cp310-cp310-linux_x86_64.whl
pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl
pyo3_option_pricing-0.1.0-cp311-cp311-linux_x86_64.whl
pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyo3_option_pricing-0.1.0.tar.gz

Publish

Commands:

# prerequisite
mm activate work
pip install -U twine

twine check dist/*

# assuming .pypirc configured
# for linux only manylinux: the others will be refused
twine upload dist/*.tar.gz
twine upload dist/*manylinux*
twine upload dist/*win_amd64*

Install

Commands:

pip install pyo3_option_pricing

Ref

Packaging offical recommendation: Is setup.py deprecated?.

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

pyo3_option_pricing-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distributions

pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl (213.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239.8 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

File details

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

File metadata

  • Download URL: pyo3_option_pricing-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for pyo3_option_pricing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7a85b8d479ec7f5033c4a8e14a8de945569f74eb64233928758ea92745b99d75
MD5 1257d166c975c394dd3994d8a2cf0c75
BLAKE2b-256 3e1b14c26d563066da7839ad8f83c471f18475fe6a134d4be1c07ad3c0ceeffd

See more details on using hashes here.

File details

Details for the file pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyo3_option_pricing-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8590bd4fd7f7cfbaa1cd249ad067c8fd7c601b870b44b80740189fdff8746cd8
MD5 d72dafaebd64fffc9b29c68460f393b4
BLAKE2b-256 9d0dfe02284ea1cb82010d186c932c33e36fdfaac0bf4eff46dd810dd09515b6

See more details on using hashes here.

File details

Details for the file pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyo3_option_pricing-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0313d6ef420f11e1a9fa499591d2f5ade804d631c99073211dbb99ac90a31649
MD5 6af2d6da19137dd867ed330d8b422155
BLAKE2b-256 4f8bc8eb9b92c2522190325757fd067e7e454336cb4a20b5d6d74c7976a83312

See more details on using hashes here.

File details

Details for the file pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyo3_option_pricing-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1cac6e48963002f17bc5bb5436f2ba25ebed8499ad2f8e702a91c36937737afd
MD5 9adcaca64c1bad2de73a561ef0b642fe
BLAKE2b-256 84fdaa9f4f7e89cbbcf640f4119b8c5fbf99b7f25637e930cfa685e92c7e8e88

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