Skip to main content

A small package to do some finoptim optimisations

Project description

FinOps package

The best python package to help you optimise your cloud spendings

Usage example

import finoptim as fp
import pandas as pd


past_usage = pd.DataFrame(...)
guid_to_price = fp.cloud.load_aws_prices(as_dict=True)
prices = np.array(past_usqge.index.map(guid_to_price))

usage = fp.normalize(past_usage)

res = fp.optimise_past(usage, prices)
predictions = pd.DataFrame(...) # some SQL query
current_reservations = pd.DataFrame(...) # some SQL query

normalize_reservations = fp.normalize(current_reservations)

res = fp.optimise_past(predictions, prices)

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

  • possibility to precise the period of the data in case it is not inferred correctly

  • " call PyErr at suitable intervals inside your Rust function, and check the returned value. If it was -1, immediately return from your Rust function;"

  • compute the better step size to avoid waiting too long

  • coverage must folow the same inputs as cost

  • allow for long DataFrame as input

  • the cost function should return a gradient when evaluated (save some compute)

  • add in documentation that for now optimisation only works if you have RI < SP < OD

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

finoptim-0.0.21.tar.gz (20.8 kB view details)

Uploaded Source

Built Distributions

finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (1.4 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ i686

finoptim-0.0.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

finoptim-0.0.21-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

finoptim-0.0.21-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl (1.4 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.12+ i686

finoptim-0.0.21-cp311-none-win_amd64.whl (330.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

finoptim-0.0.21-cp311-none-win32.whl (293.0 kB view details)

Uploaded CPython 3.11 Windows x86

finoptim-0.0.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

finoptim-0.0.21-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

finoptim-0.0.21-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl (1.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.12+ i686

finoptim-0.0.21-cp311-cp311-macosx_11_0_arm64.whl (441.7 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

finoptim-0.0.21-cp311-cp311-macosx_10_7_x86_64.whl (487.7 kB view details)

Uploaded CPython 3.11 macOS 10.7+ x86-64

finoptim-0.0.21-cp310-none-win_amd64.whl (330.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

finoptim-0.0.21-cp310-none-win32.whl (293.0 kB view details)

Uploaded CPython 3.10 Windows x86

finoptim-0.0.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

finoptim-0.0.21-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

finoptim-0.0.21-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (1.4 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686

finoptim-0.0.21-cp310-cp310-macosx_11_0_arm64.whl (441.7 kB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

finoptim-0.0.21-cp310-cp310-macosx_10_7_x86_64.whl (487.7 kB view details)

Uploaded CPython 3.10 macOS 10.7+ x86-64

File details

Details for the file finoptim-0.0.21.tar.gz.

File metadata

  • Download URL: finoptim-0.0.21.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.2.3

File hashes

Hashes for finoptim-0.0.21.tar.gz
Algorithm Hash digest
SHA256 8d12cacc68e528eea856e2578c4e3432476cbbf4bd32d87dd3c897ad61b450ac
MD5 4abe2d83562e46e0b6e514d7fc54dd9e
BLAKE2b-256 f6e59b18dab7c6d7f4303721ec9ce00f9846a2ffd6d025d8f73f10ede81b510a

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2ffb310c8fbe4631130152e732ee8050a562c35354e44d2944f80b2aea10480
MD5 35cf9a6d02a421f6b26890ccc192ad69
BLAKE2b-256 1812576a965ea54f8043b3ff16a21b501d6f83cbb12b5d5b82a46869f56dffb1

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9acc8ab28b324ffa9f91433b345cac6468a61b44da22cae6137d064f245659df
MD5 5e54970c4c5616ea019e5cb994870a7c
BLAKE2b-256 cf09a5932d6e1dff6d21105dca16d794c0db0a083a540d55c8931a5ba39a419f

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 0fb880f80571c3978d0579984cdece2bd4577e93a329686f8082511228640177
MD5 c23b74e894b7f38fb7952fcd4edcfbe3
BLAKE2b-256 d9bdacd64c6a7dd9f687fa3dd99466aba75685d46e8e8f1bbd7640da3b379a68

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 471cbfbae836cb82127dd67ddb14283a018ef36036f754d9059382e9e1f2eec3
MD5 7102ba43cecc794a49d691c41bbaf8f6
BLAKE2b-256 8e3c4f4be54c08884e4e124d2f3c07caaf4b0c0f58784e049dfdaf4df5427b68

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7c764f8bdac52399b93f97500f6eedf8223b42c4d708c429ffb4af19f4127882
MD5 ae1d46a12d18f83f6f99704109fefbfd
BLAKE2b-256 071b8e8e235aa76bce8fd93ece618ccd92e04b36ff915867b3fdf1378c34cc62

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 e3e3e934749dd58853ba2a9b0904a7f25abdcbb1ae854dd2457d262fd0746440
MD5 5bcd5eacfd564d692e9e7f959065b8af
BLAKE2b-256 02d36b7f5b20bccc0399894505fff0c35ffa7307cf0214b46bbdb44e46e15c03

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 47a812abe9a0be61d30360bba0bf8c7007c48d11d07af54bd273a7305db06b5d
MD5 a4c7ed542d23fe24acc123f3a38c9df6
BLAKE2b-256 bc38bf709cbd5d1770e4b2aa1ea1b47489c7aad6ce4cbf48ad803f9c36b595f6

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-none-win32.whl.

File metadata

  • Download URL: finoptim-0.0.21-cp311-none-win32.whl
  • Upload date:
  • Size: 293.0 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.2.3

File hashes

Hashes for finoptim-0.0.21-cp311-none-win32.whl
Algorithm Hash digest
SHA256 aa8d04a968fc28ea58e88c97bacf79e6161d0b72a9965548f6c98e2e9aba014f
MD5 545eae1d4d66cb305692fc4f5ca2e986
BLAKE2b-256 06888fd41199c26f46d7ddef2377f9a3d0facd8d9a59e4cd094aa26d24aad000

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5dfe090b8c433c96092a59e4a038d80967424479d09c760a056761b1966116b4
MD5 799ad9531fc0dc3b6de89907908539f0
BLAKE2b-256 3d752e2f69201db9a3df75a8138b9705c4e7c7243f60c684d315f780b9bfd833

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 778694496d8249216c4e2edd116d014191282815c6929d2f98d99676acf30d2f
MD5 f0840f4d583c471de9ddca9a6a2e3670
BLAKE2b-256 b61f418c7b67a854622dfb0d2f3d421838cffe81719422a1d2ebd99b1aea89ba

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 b98195cdf31eab53bb4d6ea46c92242cf8606ef57835403aa419e1b9db32cc15
MD5 3c54462457e913f4ba8e68c3694d67e1
BLAKE2b-256 e0442d755603b889735b465fff8cbf1ed3e0494fb3813363677a67359a45710e

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a6f2ff8c0050839156a7d67d1971813d50683ebab406ad1c32a9ccb8643acae7
MD5 a5861c3ee3dd725fffb5b60e8c7b32ff
BLAKE2b-256 e99d93cc2e30703605b2fdfadbb68be088a456da84feb625f8f5363a429b6929

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp311-cp311-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp311-cp311-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 cfb69225bac365944c20664b30cb75bede52a8d777f8fc841ebf6fd6b69a8409
MD5 4245d75b6f22f80db90d38bbee6fcfb3
BLAKE2b-256 a7b7dae4f0bf9e7e8f1448c3c78c267c367370cb29ba978a12fef54a0087d93f

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 7a5df5c44b6da7f5d3bc17ec5955e2a2fd2ec6d42def5b1640f82139acfbe72f
MD5 69cfe8679a9544ed35767d0a13448958
BLAKE2b-256 01d7711b2c661e975bc5f03d714d9ccf66ce89c78479e484518539cf03251771

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-none-win32.whl.

File metadata

  • Download URL: finoptim-0.0.21-cp310-none-win32.whl
  • Upload date:
  • Size: 293.0 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.2.3

File hashes

Hashes for finoptim-0.0.21-cp310-none-win32.whl
Algorithm Hash digest
SHA256 be506d359ccfd8dedf30ed20ce197374f4c4ccdef46fdd28b15d9641fafd3374
MD5 976b6c3dadefa17998af48158429e9c9
BLAKE2b-256 4e1e2df530aa3dbcdbd6f6811514ce0243a190f7ecbff166045da110a1d7d178

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6525c43642ce16a24c2fe10203242ed1349c1f2740478229dcc22ffa0b8c8eb5
MD5 663bb2c15f51ef5563e7e570aea397b5
BLAKE2b-256 f2ad70b16e173ebeadd76964b2cd68295d5f63bd5f53a36a414324857b989e07

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 17bd22ee857196178affef1be80dd8733134b589b084da24cdfc994a32f96a8a
MD5 79b7ad0210add9c91ddacfe469d8670d
BLAKE2b-256 05f382cd49e7c4ac79624d09d347e293df1e197ff953792e6b34b9bf1642da02

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 5f400c68c72638b8b4a09e893dfcb6087b53ac579a66177f36e3df213cdb8a5a
MD5 36415364479c6dee6e09574c29078d7b
BLAKE2b-256 87c39f393db0b430cf4afb002fe6b7c43806d7194a93cae6e2e40cdc203e3c13

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1e3facf692687f2bdaef2269641575042e48ee077af1fa2e0dd438f9cdce2309
MD5 896128174cb338b0098d5cda4fe34992
BLAKE2b-256 0fd6d5f55dd11e74d5a42787f25038ab90297904639cf945ca0cb870b7e2c607

See more details on using hashes here.

File details

Details for the file finoptim-0.0.21-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for finoptim-0.0.21-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 16250b8ddc24af03ece75d56d082711a68cbbf2423c012c9d5b2783546ffbbb4
MD5 dba2ceaaa90ec2c33af8012d503ce8d7
BLAKE2b-256 22b35831204c26f5f0928f1d3c4525948cae4e418216a8edc259f965224d8ac6

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