Skip to main content

py-pilecore

Public python SDK for the CEMS PileCore web-API

Checked with mypy Code style: black Imports: isort Coverage Status

This repository is created by CEMS BV and is a public python wrapper around the CEMS PileCore web-API.

Installation

To install a package in this repository run:

$ pip install py-pilecore

ENV VARS

To use py-pilecore add the follow ENV vars to your environment. Or provide them when asked.

* NUCLEI_TOKEN
    - Your NUCLEI user token

You can obtain your NUCLEI_TOKEN on NUCLEI. Go to personal-access-tokens and create a new user token.

Contribution

Environment

We recommend developing in Python3.11 with a clean virtual environment (using virtualenv or conda), installing the requirements from the requirements.txt file:

Example using virtualenv and pip to install the dependencies in a new environment .env on Linux:

python -m venv .env
source .env/bin/activate
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install -e .

Documentation

Build the docs:

python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install .

sphinx-build -b html docs public

Format

We format our code with black and isort.

black --config "pyproject.toml" src/pypilecore tests notebooks
isort --settings-path "pyproject.toml" src/pypilecore tests notebooks

Lint

To maintain code quality we use the GitHub super-linter.

Reproduce the full CI lint job (Docker)

The CI lint job runs the super-linter Docker image. To reproduce it exactly, run the run_super_linter.sh bash script from the root directory (requires Docker):

./run_super_linter.sh

Like CI, this lints only the files changed against main and auto-fixes black/isort formatting in place.

Run the Python linters without Docker

The active Python linters are pinned in the lint optional-dependency group. CI lints only the Python files changed against main (and excludes tests/), so collect that file list first, then run each linter against it:

pip install -e ".[lint]"
FILES=$(git diff --name-only main...HEAD -- '*.py' | grep -v '^tests/')

black --check --config "pyproject.toml" $FILES
isort --check-only --settings-path "pyproject.toml" $FILES
flake8 --config ".flake8" $FILES

mypy needs a caveat: super-linter runs it without installing the project, so unresolved third-party imports (matplotlib, numpy, pandas) become Any and their errors disappear. Reproduce that by running mypy from an environment that has only mypy installed:

python -m venv .mypy-venv
.mypy-venv/bin/pip install mypy==2.1.0
.mypy-venv/bin/mypy --config-file "pyproject.toml" --no-install-types $FILES

Running mypy in a fully-installed environment reports extra import-related errors that CI does not, so the Docker script above remains authoritative.

UnitTest

Test the software with the use of coverage:

python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install -e .
coverage run -m pytest

Requirements

Requirements are autogenerated by the pip-compile command with python 3.11

Install pip-tools with:

pip install pip-tools

Generate requirements.txt file with:

pip-compile --extra=test --extra=lint --extra=docs --output-file=requirements.txt pyproject.toml

Update the requirements within the defined ranges with:

pip-compile --upgrade --extra=test --extra=lint --extra=docs --output-file=requirements.txt pyproject.toml

Note that pip-compile might run from your global path. You can also invoke the compile command from the piptools module on a specific python installation (e.g. within a virtualenv):

python -m piptools compile

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_pilecore-2.4.0.tar.gz (81.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_pilecore-2.4.0-py3-none-any.whl (116.8 kB view details)

Uploaded Python 3

File details

Details for the file py_pilecore-2.4.0.tar.gz.

File metadata

  • Download URL: py_pilecore-2.4.0.tar.gz
  • Upload date:
  • Size: 81.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for py_pilecore-2.4.0.tar.gz
Algorithm Hash digest
SHA256 28308df6c24c1b601ffd9de4b7d2cdfc61120c7c27cf45fc7cce150b21a10f51
MD5 af795486e0f46e8105158dbc2e6be290
BLAKE2b-256 40b7549b5a40e6e4fa8c08efd63edc9dd7baad41e16df965bda91ff4619012ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_pilecore-2.4.0.tar.gz:

Publisher: release_pypi.yaml on cemsbv/py-pilecore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_pilecore-2.4.0-py3-none-any.whl.

File metadata

  • Download URL: py_pilecore-2.4.0-py3-none-any.whl
  • Upload date:
  • Size: 116.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for py_pilecore-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61c6bedb17259a076211eea35913aacc84db3cda3d83179e698f6e9462254d22
MD5 1c5f31f000bbaeee3af4720eaa49e70b
BLAKE2b-256 b92267717a24cd86cace48f4d9bf2a4a028814508d15152e2ac393a9c4387555

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_pilecore-2.4.0-py3-none-any.whl:

Publisher: release_pypi.yaml on cemsbv/py-pilecore

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.5.1

2 files

2.5.0

2 files

This release

2.4.0 This release

2 files

2.3.2

2 files

2.3.1

2 files

2.3.0

2 files

2.2.5

2 files

2.2.4

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.0

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page