FlahaX
FlahaX chooses a fertilizer combination and the grams of each salt for a fixed crop formula. Version 0.1.0. It is a separate Python package. The FlahaFAST application does not import it.
The crop formula does not change. This season’s water is subtracted from it. The gap that remains is what the salts must cover. Every real salt in the library is a candidate. Non-negative grams decide which salts stay in the mix.
License
Use of FlahaX is free of charge, including commercial use. The Flaha Free Use License allows you to install and run the package. It does not allow you to modify the software, and it does not allow you to give copies of it to anyone else. Downloading an official release for your own use is covered. Republishing, forking, or shipping your own copy is not.
Because modification and redistribution are withheld, this is a proprietary free-use license. It is outside the Open Source Definition, which requires those permissions.
Install
Python 3.11 or newer. No third-party dependencies.
From this repository, in a virtual environment:
python -m pip install -e .
python -c "import flahax; print(flahax.__version__)"
The package is not on a public index yet. Building a release is described in docs/publishing.md.
Quick start
from flahax import load_library, recommend
result = recommend(
load_library()["salts"],
targets={"N_NO3": 128, "P": 58, "K": 211, "Ca": 104, "Mg": 40, "S": 54},
water={"Ca": 20},
)
The same call from the command line, reading JSON on standard input:
@'
{"targets": {"N_NO3": 128, "P": 58, "K": 211, "Ca": 104, "Mg": 40, "S": 54}, "water": {"Ca": 20}}
'@ | python -m flahax
result["salts"] lists each chosen salt with gramsPerLitre. result["rows"] lists each element with its target, the final ppm, and deltaPct.
Proof
Edited pepper targets, with 20 ppm calcium already in the water, fit inside 1% on every targeted element using six salts:
| Salt | g/L |
|---|---|
| Potassium nitrate | 0.546 |
| Magnesium nitrate | 0.415 |
| Calcium sulfate | 0.290 |
| Phosphoric acid (75%) | 0.146 |
| Calcium nitrate (ag grade) | 0.046 |
| Calcium monobasic phosphate | 0.048 |
The mathematics, the library counts, and the regression case are in docs/method.md.
Documentation
- docs/usage.md — install, library call, command line, inputs, and result fields
- docs/method.md — ppm equation, solver, library file, and the pepper proof
- docs/publishing.md — build the sdist and wheel
- INTEGRATION.md — how FlahaFAST can call the package without changing the current flow
Tests
After pip install -e ., from the repository root:
python -m unittest discover -s tests -t .
Scope of this version
Grams are for one litre of the solution the plant sees. This version does not split tanks, adjust pH, price the mix, or apply a concentration factor. It does not write to the FlahaFAST database.
Release files for flahax 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flahax-0.1.0.tar.gz | 18.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flahax-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.5 kB
Release files / flahax-0.1.0.tar.gz
| Download URL | flahax-0.1.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3e3924b72615a91c2f7bc09dc523e2d82ba1bd52b2a40fd708d4e7700bd0cd3
|
|
BLAKE2b-256 checksum How to use checksums |
7c5d88e39286b320282df88e5264569880be21ea41b0fad30a0727e027cef3c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / flahax-0.1.0-py3-none-any.whl
| Download URL | flahax-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9667a836510f40cb2bca5dd52b6f483b6f00d6f4a9b3f0d7b8356051293088fc
|
|
BLAKE2b-256 checksum How to use checksums |
1e762ef7d1904ce81d0a3e19ffe0c28f99f9b8735d460c8747da170d26fd7e9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|