FinOptim package
The best python package to help you optimise your cloud spendings
Instalation
The package is available on PyPI, it is possible to install it directly with pip.
pip install finoptim
It requires at least Python 3.10. The documentation is available on readthedoc.
Usage example
import finoptim as fp
import pandas as pd
past_usage = pd.DataFrame(...) # some query of yours
prices = fp.prices.aws()
print(prices_df.iloc[:, :4].to_markdown(
tablefmt='rounded_outline',
numalign='center'))
>>>
╭──────┬────────────┬──────────────┬─────────────────┬──────────────╮
│ │ Arlequin │ Moratorium │ Anthropophage │ Apophtegme │
├──────┼────────────┼──────────────┼─────────────────┼──────────────┤
│ OD │ 0.167 │ 0.122 │ 0.0056 │ 0.0058 │
│ RI3Y │ 0.0637352 │ 0.0476682 │ 0.0022035 │ 0.00234155 │
│ RI1Y │ 0.0981063 │ 0.0716404 │ 0.00330824 │ 0.00330824 │
│ SP1Y │ 0.115 │ 0.09 │ 0.0038 │ 0.0039 │
│ SP3Y │ 0.073 │ 0.054 │ 0.0025 │ 0.0026 │
╰──────┴────────────┴──────────────┴─────────────────┴──────────────╯
All the prices are per hours.
Proceeding to the optimisation is made with the optimise function
res = fp.optimise(past_usage, prices)
The optimise function can take as input lots of different predictions, and also current commitments. The optimisation is made with all the pricing models found in the prices object
predictions = [pd.DataFrame(...), ...] # some query of yours
res = fp.optimise(
predictions,
prices,
current_commitments={"type" : "RI3Y", "level" : 10 * 32, 'guid' : 'Moule à gaufres', "end_date" : date(2024, 12, 21), 'price_key' : .0123},
convergence_details=True
)
Now the res object hold the best levels of commitment on the time period.
guid_to_instance_name = {"K7YHHNFGTNN2DP28" : 'i3.large', 'SAHHHV5TXVX4DCTS' : 'r5.large'}
res.format(instance_type=guid_to_instance_name)
print(res)
>>>
╭─────────────────┬──────────────────────────┬───────────────╮
│ instance_type │ three_year_commitments │ price_per_day │
├─────────────────┼──────────────────────────┼───────────────┤
│ i3.large │ 1338 │ 2,886 │
│ r5.large │ 1570 │ 2,564 │
│ savings plans │ 1937 │ 1,937 │
╰─────────────────┴──────────────────────────┴───────────────╯
TODO
lib convenience
- allow for long DataFrame as input
- the cost function should return a gradient when evaluated (save some compute)(the function is a nightmare : abort the mission)
- listening to keyboard interupt from Rust is harder than expected with multi threading
- logging instead of printing, both in the Python and Rust sides
actual problems
- find a real stop condition for the inertial optimiser
- can we guess the "eigenvectors" of the problem ? if we have estimations, we can set great parameters for the inertial optimiser
- problem is highly non linear and this will require more thinking
Project size
wc -l src/finoptim/*.py rust/src/*.rs src/finoptim/prices/*.py tests/*.py
is around 3k lines of code
Metadata
Release files for finoptim 0.1.72
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| finoptim-0.1.72.tar.gz | 32.9 kB | Without provenance | Details |
Built distributions (wheels)
Total release size: 22.5 MB
Release files / finoptim-0.1.72.tar.gz
| Download URL | finoptim-0.1.72.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f379525a4e8c96224e19464da3fb88f828cb7567f27fc07103b816b0c10a9f56
|
|
BLAKE2b-256 checksum How to use checksums |
5cd9fdaec258561af1f22e76f24a1da3814fcbd99e69decee3e4dbb57e1569ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | finoptim-0.1.72-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
439078f706ff075f7d5f1cec39028ef42238fa48f639e52086e5e0ed7a7fa710
|
|
BLAKE2b-256 checksum How to use checksums |
6c9624ea32734fbd4afd00143d397d317d5fe40ea7cbe7431a95042842225b9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | finoptim-0.1.72-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
60b5e18053e535fa0eb6c55c774ef8af0d01cc4f7b22de88861d64f46b3a3b4d
|
|
BLAKE2b-256 checksum How to use checksums |
0b892f811a9a1ef1d6c11f37a369148cd18e7e01b79506c3521954aa1e63a3f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl
| Download URL | finoptim-0.1.72-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Linux glibc 2.12+ x86-32 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
aaf17a4b5543c79426c3e59482aa63f993ee0aa655bc530cfcd50e70468d3a98
|
|
BLAKE2b-256 checksum How to use checksums |
9c5e1c1b8fd255d7cb20007c0520041f23cb07730bbd6e2051f7581dee25db28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | finoptim-0.1.72-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
46f72c39401af3b08b1aa4d441f1e92b18536c19470b1e3edaf1f82769820732
|
|
BLAKE2b-256 checksum How to use checksums |
b6b904080e592f97b2def8fe144b5ab8ecbad9df44ee2218bdddc0f017de973d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp312-none-win_amd64.whl
| Download URL | finoptim-0.1.72-cp312-none-win_amd64.whl |
|---|---|
| Size | 397.4 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
eedd70f194b66c56ab3bc7c7c8bb0a152c9810949bed118806abdf53c3442f6a
|
|
BLAKE2b-256 checksum How to use checksums |
e3828a61ff05e66fcf530fbcad0efa2abb3b7e15d7a60b24db10af974bb328d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp312-none-win32.whl
| Download URL | finoptim-0.1.72-cp312-none-win32.whl |
|---|---|
| Size | 350.1 kB |
| Tags | CPython 3.12 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
7ca5c1af5e66c3d53e6a822b0b0dd25dcf914bcfb1126988e9efea854fbb6fff
|
|
BLAKE2b-256 checksum How to use checksums |
e2a41ce267524f329360b079aa1f88ff22c1ada74960e660263c2475be36b920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | finoptim-0.1.72-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
bda885cb18fbdd58582f9bd0d4920c1e4e28be79c06cd063b675c175538369bd
|
|
BLAKE2b-256 checksum How to use checksums |
34082deb61e8f629f282135faedd7a4a162f68fe3bc86856f47298f922645eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | finoptim-0.1.72-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
412ca98f281a8c324b76c77bce03fc6699ce247464073d9884d903c6e8d99818
|
|
BLAKE2b-256 checksum How to use checksums |
ad4b69cbeea744afe9377a374f508abab9e6abf06264fb05a9a16f51b47b3a6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl
| Download URL | finoptim-0.1.72-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.12 Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
f0aa81fcf1d5673f9875bd03fc5eaed9bb8f4c07158f82f96408b108be5539f6
|
|
BLAKE2b-256 checksum How to use checksums |
ea85435114382e61c4835b58e5ecc453cb65f7f555aa38597cf1fa9250ffe14b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-none-win_amd64.whl
| Download URL | finoptim-0.1.72-cp311-none-win_amd64.whl |
|---|---|
| Size | 398.1 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
21c8291e197c60414cd92873347150768fc7072c39ea132c1a9168574c1dfd07
|
|
BLAKE2b-256 checksum How to use checksums |
c18d1ec1c10e297b03fcba6985cedf07bed770d6b2e0a2a1c344b9bfd561cf22
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-none-win32.whl
| Download URL | finoptim-0.1.72-cp311-none-win32.whl |
|---|---|
| Size | 351.7 kB |
| Tags | CPython 3.11 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
ebd77f0a663cfbab8def37b79c62abe3fcd2511bdf941f18f65dd6939e9420b3
|
|
BLAKE2b-256 checksum How to use checksums |
42b9eb1db60f46e199509ab5a830b6d19d463c64cdf9945ae1228d6a37f698c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | finoptim-0.1.72-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f4c50f420b5d52c7a31424d00be5c7c938c40747a57d192aa125af276e5eec1b
|
|
BLAKE2b-256 checksum How to use checksums |
6cb9d4b4c97141dccf5779dfeb448ea8c146efffe93001ca22d7eb80302a42fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | finoptim-0.1.72-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
5711a894ff1c2209f8dabcd16ed3381f4c13bf66ab583f8fd61ff5562cd56f13
|
|
BLAKE2b-256 checksum How to use checksums |
84ffc7cfa754d169ae9a6d146d488f6a18a949d891e36fe4103885eac71f1b62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl
| Download URL | finoptim-0.1.72-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
5734374e6b87e6b1d5571c8a0eb69464c5bda169082c25f2bdaedcad7d0da9f8
|
|
BLAKE2b-256 checksum How to use checksums |
0d6403fd2b7ce3c64f033cc622a5b564f9fcaa7d742ae1cf745110436548794a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | finoptim-0.1.72-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 497.9 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2ec4e526f31762e4b942a413660365179c35eb61891446bf987645279d78c90b
|
|
BLAKE2b-256 checksum How to use checksums |
8037f591d96c13286d3c5f484ace61f0041676179459bc1000ef931ad4bb1263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp311-cp311-macosx_10_7_x86_64.whl
| Download URL | finoptim-0.1.72-cp311-cp311-macosx_10_7_x86_64.whl |
|---|---|
| Size | 553.5 kB |
| Tags | CPython 3.11 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
58c12d125101a0fbeb1161a00f136d2052a31dc680b56292468398582f96e4f6
|
|
BLAKE2b-256 checksum How to use checksums |
ff9cb50ad894ee034e95d938ef298def1a42d585da894f9d605e291e8970afdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-none-win_amd64.whl
| Download URL | finoptim-0.1.72-cp310-none-win_amd64.whl |
|---|---|
| Size | 398.1 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
3ec03844d75aba451652789a8811b69fce93ccb1327cd308c9be05149dbfae4d
|
|
BLAKE2b-256 checksum How to use checksums |
3296c490c1c9b1d0e878e4c0b2beed98281540500cf0715990c38be2f3e52327
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-none-win32.whl
| Download URL | finoptim-0.1.72-cp310-none-win32.whl |
|---|---|
| Size | 351.7 kB |
| Tags | CPython 3.10 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
c9cd89840c6f5e817c2a88523588ef7f9b9aadfda2d777778fc3d98e98c385c0
|
|
BLAKE2b-256 checksum How to use checksums |
72a04dbc10def0913fdde8868731a555056c8adc67c4f038e3b6282fdf0300ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | finoptim-0.1.72-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
8a30405adf2243a49595be6cb408ab42a7b7c5667ecceb28d512efc83407383c
|
|
BLAKE2b-256 checksum How to use checksums |
d5279de59bdab7f5eebbcd90524c85cd1327277965ac11ffd48dfefe96af39ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | finoptim-0.1.72-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
2ffa61c9063189c237dc3cbfa62d58e09fcdb0713ea455d422992551375b207a
|
|
BLAKE2b-256 checksum How to use checksums |
09378aa2336b81365876eadf97f9a689091cfc59bf2132ac925fcee60d8f1dc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
| Download URL | finoptim-0.1.72-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
b8c484e7088273bea4524851423e380367f3a64d9ae24c4b5b1bdb3937e7f8ae
|
|
BLAKE2b-256 checksum How to use checksums |
40ccb8699531c48d078d7956bca08e08f4d1c4d8257cc50013f58baf19e12962
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | finoptim-0.1.72-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 497.9 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
63d9ccc5c157f7f33c69a264712d323b44c253d7806b8f7b0f297fb3d6e7f040
|
|
BLAKE2b-256 checksum How to use checksums |
934c5a597c55d509ff43e7f72524573adf51e61dfa4907a243d9f25013d28e1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Release files / finoptim-0.1.72-cp310-cp310-macosx_10_7_x86_64.whl
| Download URL | finoptim-0.1.72-cp310-cp310-macosx_10_7_x86_64.whl |
|---|---|
| Size | 553.5 kB |
| Tags | CPython 3.10 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
8d2ce8277e8291894e375148f67488a9a054ac15423c2f45c1000b18eadcd119
|
|
BLAKE2b-256 checksum How to use checksums |
185a4a901dd4eca7f37505422645819271fe3e7cf582fa03dc4fed61a3f30fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.3.1
|
Security for finoptim 0.1.72
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.