jNeqSim
Python interface for the NeqSim java package, with stubs. Java interface is created with jpype, and stubs are generated with stubgenj
PYPI
https://pypi.org/project/jneqsim/
Demo
Example
from jneqsim import neqsim
def pressurize_gas():
inlet_fluid = neqsim.thermo.system.SystemSrkEos()
neqsim.thermo.system.SystemSrkEos()
thermo_ops = neqsim.thermodynamicOperations.ThermodynamicOperations(inlet_fluid)
inlet_fluid.addComponent("methane", 100.0)
inlet_fluid.setTemperature(10, "C")
inlet_fluid.setPressure(20, "bara")
inlet_fluid.setMultiPhaseCheck(True)
inlet_fluid.setSolidPhaseCheck("methane")
thermo_ops.TPflash()
thermo_ops.bubblePointTemperatureFlash()
inlet_fluid.initProperties()
enthalpy = inlet_fluid.getEnthalpy()
inlet_fluid.setPressure(1.0, "bara")
thermo_ops.PHflash(enthalpy)
Dependencies
Version Management
jneqsim uses a controlled release process to ensure compatibility:
- Pinned Versions: Each jneqsim release is pinned to a specific, tested NeqSim JAR version
- Automated Updates: The nightly CI workflow automatically checks for new NeqSim releases and publishes updated jneqsim packages when available
- No Auto-Updates: Applications using jneqsim will not automatically download newer NeqSim versions - they use the tested version that comes with their installed jneqsim package
- Cache Management: Downloaded JARs are cached locally in
~/.jneqsim/cachefor faster subsequent usage
Development
Running Tests
The project uses pytest with custom markers to categorize tests. Test dependencies are already included in the development dependencies.
# Install development dependencies (includes pytest and pytest-mock)
poetry install
# Run unit tests (fast, excludes tests marked as slow)
pytest -v -m "not slow" tests/
# Run all tests (may download JARs for integration tests)
pytest -v tests/
# Run with coverage (requires pytest-cov)
poetry add --group dev pytest-cov
poetry run pytest --cov=jneqsim --cov-report=html tests/
Test markers:
slow: Tests that may download files or take longer to runintegration: Integration tests that require external dependenciesunit: Fast unit tests (default)
👍 Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Metadata
Release files for jneqsim 3.25.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 | Provenance | |
|---|---|---|---|---|
| jneqsim-3.25.0.tar.gz | 3.0 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jneqsim-3.25.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.0 MB
Release files / jneqsim-3.25.0.tar.gz
| Download URL | jneqsim-3.25.0.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e8bc45f0fef1c7269f4867ed3b3405213dd611605a990471c2d6b5b73bab90f
|
|
BLAKE2b-256 checksum How to use checksums |
35589c17617682ec636a1d4b4436e5d4c36cd98cc70c24ad465511598b665a03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / jneqsim-3.25.0-py3-none-any.whl
| Download URL | jneqsim-3.25.0-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c3e5838f415739199e60bbcf97d921aecd9810a5f820538a3c2cf175c98c14f
|
|
BLAKE2b-256 checksum How to use checksums |
c074624b8bb1b2d78d5c02f1eeb85bf9a9fb80fd382585afa7f4e8ff35b72b65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for jneqsim 3.25.0
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.