Symbolic computations.
Project description
symba
In what follows python
is an alias for python3.6
or pypy3.6
or any later version (python3.7
, pypy3.7
and so on).
Installation
Install the latest pip
& setuptools
packages versions
python -m pip install --upgrade pip setuptools
User
Download and install the latest stable version from PyPI
repository
python -m pip install --upgrade symba
Developer
Download the latest version from GitHub
repository
git clone https://github.com/lycantropos/symba.git
cd symba
Install dependencies
python -m pip install -r requirements.txt
Install
python setup.py install
Usage
>>> from symba.base import Expression, sqrt
>>> golden_ratio = (1 + sqrt(5)) / 2
>>> isinstance(golden_ratio, Expression)
True
>>> golden_ratio * golden_ratio == golden_ratio + 1
True
>>> 1 / golden_ratio == golden_ratio - 1
True
>>> def fibonacci(index: int) -> Expression:
... """
... Based on:
... https://en.wikipedia.org/wiki/Golden_ratio#Relationship_to_Fibonacci_sequence
... """
... golden_ratio_power = golden_ratio ** index
... return ((golden_ratio_power - (-1) ** index / golden_ratio_power)
... / sqrt(5))
>>> fibonacci(0) == 0
True
>>> fibonacci(1) == 1
True
>>> fibonacci(100) == 354224848179261915075
True
Development
Bumping version
Preparation
Install bump2version.
Pre-release
Choose which version number category to bump following semver specification.
Test bumping version
bump2version --dry-run --verbose $CATEGORY
where $CATEGORY
is the target version number category name, possible
values are patch
/minor
/major
.
Bump version
bump2version --verbose $CATEGORY
This will set version to major.minor.patch-alpha
.
Release
Test bumping version
bump2version --dry-run --verbose release
Bump version
bump2version --verbose release
This will set version to major.minor.patch
.
Running tests
Install dependencies
python -m pip install -r requirements-tests.txt
Plain
pytest
Inside Docker
container:
- with
CPython
docker-compose --file docker-compose.cpython.yml up
- with
PyPy
docker-compose --file docker-compose.pypy.yml up
Bash
script (e.g. can be used in Git
hooks):
-
with
CPython
./run-tests.sh
or
./run-tests.sh cpython
-
with
PyPy
./run-tests.sh pypy
PowerShell
script (e.g. can be used in Git
hooks):
- with
CPython
.\run-tests.ps1
or.\run-tests.ps1 cpython
- with
PyPy
.\run-tests.ps1 pypy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for symba-0.7.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45458078912fbb92f1467ff4f54519a0d1cb61fd0aeed9cb49a46b4fa64d9a40 |
|
MD5 | 4fd1c8ffc4f2dfcae0200dc5e583748a |
|
BLAKE2b-256 | 971e06334e24fc46267e216658ab32d1d3196371e169bb725d70789c3a25ef5a |
Hashes for symba-0.7.1-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffb6c9d1dda5d2eda2c7fce15ecc43531f7272c8b729c74c9b877e870d4d2593 |
|
MD5 | c3ce9f62c69024c7b0a83838aaa19c5b |
|
BLAKE2b-256 | 4ec70f6570c7898b7157dc9b10ac1204dedab928aa0c0aa84886fbb6da5cd15b |
Hashes for symba-0.7.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 988ef40f4e64348b54b2886f53afef6fe15424c7d0555a660a9a1344ec2d02fb |
|
MD5 | 002aed8c5e14be6ad78a62318f9e6e31 |
|
BLAKE2b-256 | 69acd1f19f2b8b26c325772be4e7cc15b0962ca03fa78327340038e53441f972 |
Hashes for symba-0.7.1-cp310-cp310-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e86f8ef0f1a589ad3c3b9da8aa28295a18e649dc3ad25682a047c8689e2dae4 |
|
MD5 | 92ceed51019f28b54fdddbf8e86d9b0c |
|
BLAKE2b-256 | a2a199508adb032893ee3af7810afea8a0b980de29f360669702cfc99b1cd43e |
Hashes for symba-0.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 911f06993c08eaa4f37afc9b012755e138c051f18b1486ac0b784d77cfd0d4a6 |
|
MD5 | b3bae5352882abb2d226a37db3be03c2 |
|
BLAKE2b-256 | ea1c1a222af60758f7d4fff1fa803a1001b2590ddf9d2703dc1a223b4bce79fa |
Hashes for symba-0.7.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0d2885c9fc02b1dd50a221a5d857b6369451f5c96812be01caa0a65f9b87ea2 |
|
MD5 | a4bb6a757bd81876b76b7c7834a27a01 |
|
BLAKE2b-256 | 358aa2f1bf209ff6a2c833ac019e635a3cc4f31a35b1432e3ff370aae6eb9bf1 |
Hashes for symba-0.7.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9997c69de283f1f8537951136027481557e4af05cd1c5dd02cd603341c093662 |
|
MD5 | e89cc1dec60e65df7e9adba38003e27f |
|
BLAKE2b-256 | 8a0f1d10885947335e2258e563a2a9f4161bda0896df84fec05e1550b3fcdb63 |
Hashes for symba-0.7.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bc10680b4373fb54da20cebd5b054107be6b370369e7b89e8c1d9536125d13a |
|
MD5 | efaa6617baeca352c5d8cf05640a3d36 |
|
BLAKE2b-256 | a0eae777571ea906b0796a81e7a5365c5573c6bfa40fcb4bac390f4c74bdfa0e |
Hashes for symba-0.7.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e85ba5d1bd8c5e7c4e6b478aa1f9397429afa7336df9c15640a3e96ed9e33077 |
|
MD5 | 228d05565f31b5d3696725c26e4a5899 |
|
BLAKE2b-256 | c17a5dfef7cca5e192a0088f8370947d101d01412fd747f2136d6af428ed2606 |
Hashes for symba-0.7.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fccb7eabda737782364af35a3dd74cbd847e6c1d251d2541ee4e179907d396d1 |
|
MD5 | f3b4f726ac8ea900cc8c55b3ad6ab416 |
|
BLAKE2b-256 | 1ba4b9006e55e2610dafd046f8b16cad9e06a30543a7e157d000486ba6644845 |
Hashes for symba-0.7.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c79400ea951dfd53b0bc5d6eea1985b28573c42e82e676916aa713a336ba5293 |
|
MD5 | 139a87fe9e64a07cf8f2933cd2b223d1 |
|
BLAKE2b-256 | df40a7bac18d1fff21e9b7fa9f1d7446b574a7308cc202432774bb74bdfb629a |
Hashes for symba-0.7.1-cp39-cp39-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1259cdaa9cdc287cc85c4db343795a9ed98af0ab096fe5b69e31821d28e756d2 |
|
MD5 | c6f47b62d2ce29e8b51f9db720e9fc42 |
|
BLAKE2b-256 | 7a587c4f2d5e8769379eba473dd2322497e75e80ab6bc8ee4c90fa4d56cbd721 |
Hashes for symba-0.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a3db44ac453e592a5242cbce298f04701a42305222fc5b681cc9402fe81bf51 |
|
MD5 | 792937c34e75aa48920d5aee29ef5833 |
|
BLAKE2b-256 | 041d13440fd7528f01c0a23cc9d6899e9d5c0f6b9d843545d789748b29bb3f8e |
Hashes for symba-0.7.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dea61e33a7dac0e9bf0f36d7699da25fbb513e16cf8a907216ba730e1cf4825e |
|
MD5 | 0c751e80f4f439d598aed92fb39eb5ef |
|
BLAKE2b-256 | a91121f38b09f5093ef8f1ac1b6bcd6fba1a010eb8b0a36ab0bbc4b9c9561774 |
Hashes for symba-0.7.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e0a126ebaf8d146bf779239d075c89d837c0c3b7f43428b794a7c1544d5e87 |
|
MD5 | 4780a0ee28a909d3b15c1dd6760f4595 |
|
BLAKE2b-256 | ea7ec84b5717e0c51b4f84d82816dd73505c87442cc75449809cae47928b16cf |
Hashes for symba-0.7.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7674fd40040ecefb53d5e1974a7d07d18189af5a5954d57b5b800e9e4966a14c |
|
MD5 | b6f5a295bed2e5da97dae66be2be51fe |
|
BLAKE2b-256 | f060ef36b16e4f1de2d2bc9aa79812253f111f7a5354e2d23960b41e29ff6a95 |
Hashes for symba-0.7.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 338f83062e7a4dc92bc67bf1a3490236f57c08219ebf265f060e82c3c1bdf6c6 |
|
MD5 | 887128ca3b79127a354055d9af41dfaa |
|
BLAKE2b-256 | 9efc7790f9be9d079d0f821dbc53ddfef450ef32ad1024175d6b331eca5a6f09 |
Hashes for symba-0.7.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05b7bf6c81bc5c0e0eea4a2b32c33c1163c7a99962be81bea4a390c3b1f078de |
|
MD5 | 211f30af07fc065e2f5b9f342307fcfc |
|
BLAKE2b-256 | 06a43c64ab1594431bb86b7a5050aeb5b557c746e5b1bb99672ea24e03a94cb1 |
Hashes for symba-0.7.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39b1a6790526764293038651f947d915ef90ab417de8247ddbb74e079dd47649 |
|
MD5 | fa9d93f5014a7f87268b52d19b19bef6 |
|
BLAKE2b-256 | db6b3fee63aa41c3270779594c7a078222ede1a3e9cfaa4c348d254ee116d894 |
Hashes for symba-0.7.1-cp38-cp38-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8c36ca0fd481832a92f28f3491f784acc9d32b8e0b05152306eabf8191e1a60 |
|
MD5 | e89bd46ecccd7d28a0becbcdffd66497 |
|
BLAKE2b-256 | f032d82a49cfd34a681ecbbcac11d485c22e4fccc1c3476577de3e1863a6516a |
Hashes for symba-0.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 616f75dd8a8991c8a942641451899a87704bdda1f85e04c79562122bfafcb93f |
|
MD5 | e1bcc36c984655107240bca25a3718f4 |
|
BLAKE2b-256 | d589aee3d70e44ff3a6abeb8bf24d71be1c3b8e8b3f02b45b7a1ae50b25121b4 |
Hashes for symba-0.7.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2500a75fb01b83a3673d86ba8fd57496772a1f4d107decc936895c46a63411f |
|
MD5 | b44f9c8e1f25511cbe314eabc20a0d7a |
|
BLAKE2b-256 | eed8f65ee4b76db1f0265552a24ea8e9333dd69ea5e7fbde3de01b9cc61cbd60 |
Hashes for symba-0.7.1-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 851f1c17367965f41dbaf6ce9d5d14e42d3c6175d2d8eb6d66a570fb95ccb1f6 |
|
MD5 | fdac1f05d519194a5ff72fc8ca846679 |
|
BLAKE2b-256 | 523651c8f79dbfcba8cbe72f6c2723659d816ad06d5400a476fb8ba3b9f0e048 |
Hashes for symba-0.7.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fadb6cb023addc17d39f6212ec80c088803739b7f6520e4cddc1860e5f8738f9 |
|
MD5 | 23e998943db0825d29307205af4d0b25 |
|
BLAKE2b-256 | 60ef814f7616e28c5d5761b2933214af31260a1e515354159e96412217bfeed3 |
Hashes for symba-0.7.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 016a98195ac6e139d353301a96b061b8eebeb15e25f6bd345bfec22bdc0acd3e |
|
MD5 | 110715dec770bccb202dbbd732a9aeff |
|
BLAKE2b-256 | 35d185240e4ea4139d4abbc5587ec7e8fb9b4fa7cce499c3fd69a8dab70e08a6 |
Hashes for symba-0.7.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61a6302b66fe04734424143f80a3e0d84d24f065cd4b6eecdfaf56cd51601f2 |
|
MD5 | 47bda350a00a2b896acb467ae37cea73 |
|
BLAKE2b-256 | 12e87da2721d3615b55e8ee3d79a7176e5d265ef83b4fb64f869a77e2dc44e94 |
Hashes for symba-0.7.1-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11dc2de114055ae9489827ee810aca89884b93d33106e0211c94bc6baf1017a6 |
|
MD5 | f0b221d7be77dc8e1f2264edbef98f2b |
|
BLAKE2b-256 | 688d1df26e977fcf103f1136696f93a31ad2ca52acbaf35f840b96365d3ade31 |
Hashes for symba-0.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ee506ad492701ba0fccca85c45bd1b5a35502e6cdaf251cda3911efa11fbb88 |
|
MD5 | 6d07fda0b2066f1a34179190b67e18a4 |
|
BLAKE2b-256 | dc10456972ccf9f51b8b2df4f00be94bcd211a95f85d98ab68c9d58579026658 |
Hashes for symba-0.7.1-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc4179050403dd7c838a2cfd3167b47632817d9f8d7ac53a5335da840110c27e |
|
MD5 | db73d44bb1c33b13bf7bb483c4118f07 |
|
BLAKE2b-256 | 671b0032e9e287421517e5efc04b7c3ed1dcc1bc640cc8375196fdd659184178 |
Hashes for symba-0.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2224040597a566e1a57462f3665952aab5aa9d0331d5540ac09cc5cb8e7684a |
|
MD5 | 3cbaa915013df10a7850723b7cdc9a16 |
|
BLAKE2b-256 | a41b5aa3dc840b15bf6c87eed93a94bf7ac94be831acea8c4206467983cd30bd |
Hashes for symba-0.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28e51200c84a125f9afe79bb31b7a748516bdbc4eb0dcdcd2967b725383b7e08 |
|
MD5 | 6a1031967e37a1678e6e842b3fcd423c |
|
BLAKE2b-256 | a2d4e377f411e383f4479e6aecab796b1605577cf81a6b1d492e6960af08256a |
Hashes for symba-0.7.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb1c41d59963b48271c7c6cbd745db9a3c1459dea11d9a93b6d34f09ddb4ea49 |
|
MD5 | 134152e23d23b67343eba8f5826f4d5f |
|
BLAKE2b-256 | bddcd3b691117570e2a62bae4829f742507c5488fcb16349894c5cb4fdffb174 |
Hashes for symba-0.7.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e4f5a3cb9e33accddac12cd6bb12c5fa291f714f82b188435cdb341b80f34c1 |
|
MD5 | db2a8d6805af99b1317f31ada6874cf7 |
|
BLAKE2b-256 | 876a1615ad9436e662fd1c73133e83b21f02f343700ce223ed351f3ad432ec56 |
Hashes for symba-0.7.1-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c816b1d95240d5d09a9d69199b3929dcbc6d53e29f2b09e5fa6748f25feabb |
|
MD5 | a9d0575e34436f3f55ed7cd51e14d662 |
|
BLAKE2b-256 | a2384bd91fe354da25dac29a7835e725d5da739be592179be9633559baa6e82e |
Hashes for symba-0.7.1-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5320884540ad6c762d7690d68be04a5ebeb3bf776b28af5a18b1b7c87fb32ba8 |
|
MD5 | 692c4ed6543dc10a012a306c49904ea1 |
|
BLAKE2b-256 | e4547bbaa918621792b04da41433ae1f0dd77e0e6429f02efcd883c22b3e8d46 |
Hashes for symba-0.7.1-cp36-cp36m-musllinux_1_1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a70421e921e3dffbca84f56dd4218c569d69688f04224d955705a559a6419be0 |
|
MD5 | 23e355dd5f7962db15a69063e8879705 |
|
BLAKE2b-256 | 518bed23f7f3b1b2463d25a90722399a4a8438bc78fcf6db7c88b3ccc97ea796 |
Hashes for symba-0.7.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32562b5ef94d92d66bd91d0bd2496ad031226c555fea4bfd8547b851571fccb2 |
|
MD5 | e26221913e7f8f35acd3967620e9c21d |
|
BLAKE2b-256 | c6005ee4ebb6d7d401511c52254dee74bcd89f82b0e2ce4f2870dcfc74ea64c8 |
Hashes for symba-0.7.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29d9c5eac1b565bb316f1a48e367ce1df5d4828e1229af95e897c2ad2a86d6f3 |
|
MD5 | 0261cafe0fc9efcbc1241940a81e8549 |
|
BLAKE2b-256 | 9894d62716672650815f7eba55d698571c83c2a42f8b0d7ba7f6ee3787258439 |
Hashes for symba-0.7.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceca75998783c719fd89a9038409e1c0a42f715af789f5c31e655404256e2982 |
|
MD5 | 8084b1812193dbfe011653505bdf528e |
|
BLAKE2b-256 | 9ed0ca6461b186eec7d9b31a53b421550825985bee23ceb68dbd57f33d733a81 |