A python SensorThingsAPI client and sdk
Project description
{{ project_name }}
{{ project_description }}
Prerequisites
Depending on the package manager chosen when the project was scaffolded, install the corresponding tool once on your machine before proceeding.
| Package manager | Install |
|---|---|
| pixi (default) | curl -fsSL https://pixi.sh/install.sh | bash — pixi.sh |
| poetry | pipx install poetry — python-poetry.org |
| mamba | Miniforge |
For Docker workflows you also need Docker.
Development setup
pixi
Pixi manages Python, all conda-forge and PyPI dependencies, and the virtual environment in a
single tool. The environment lives at .pixi/envs/ and is not committed to git.
# Install all dependencies (creates the environment from pixi.lock)
pixi install
# Open a shell with dev tools available
pixi shell -e dev
# Or run a single task without activating the shell
pixi run -e dev test
pixi run -e dev lint
pixi run -e dev format
pixi run -e dev typecheck
Add a new dependency:
pixi add numpy # conda-forge, runtime
pixi add --pypi requests # PyPI, runtime
pixi add --feature dev pytest-mock # dev-only
Update all dependencies and regenerate the lockfile:
pixi update
git add pixi.lock && git commit -m 'chore: update pixi lockfile'
poetry
Poetry manages PyPI dependencies and creates .venv/ inside the project root
(configured in poetry.toml). Python itself comes from your system, pyenv, or a
conda base environment — it must not be installed inside the project venv.
# One-time: install poetry globally, isolated from any project
pipx install poetry
# Inside the project folder — creates .venv/ and installs all deps
poetry install
# Activate the venv for an interactive session
poetry shell
# Or prefix individual commands
poetry run pytest tests/
Add a new dependency:
poetry add numpy # runtime → updates pyproject.toml + poetry.lock
poetry add --group dev pytest-mock # dev-only
Update dependencies:
poetry update # update all within declared constraints
poetry update numpy # update a single package
git add poetry.lock && git commit -m 'chore: update poetry lockfile'
mamba / conda
Mamba manages both the virtual environment and the packages.
# Create a project-local environment
mamba env create -f environment.yaml -p .venv
mamba activate .venv/
# Install dev dependencies on top
mamba env update --prefix .venv --file environment.dev.yaml
# Recreate / update after environment files change
mamba env update --prefix .venv --file environment.yaml --prune
Add a new dependency: edit environment.yaml, then run mamba env update --prune.
Common development tasks
All tasks are available via make. Run make with no arguments to execute
lock → build-image → run-local.
| Command | What it does |
|---|---|
make test |
Run the test suite |
make lint |
Lint with ruff |
make format |
Auto-format with ruff |
make typecheck |
Type-check with mypy |
make lock |
Update the dependency lockfile |
make build-image |
Build the Docker image |
make push-registry |
Push the image to the container registry |
make run-local |
Start the app locally via docker-compose |
make build-docs |
Build the Jupyter Book documentation |
make clean-docs |
Remove the documentation build output |
Pre-commit hooks
Code quality checks run automatically on every git commit. Install the hooks once after cloning:
pre-commit install
Run all hooks manually at any time:
pre-commit run --all-files
The hooks cover: ruff (lint + auto-fix), ruff-format, mypy, and standard file hygiene (trailing whitespace, YAML validity, merge-conflict markers, large files).
Docker
Copy .env.example to .env and fill in the values (copier does this automatically on
first scaffold):
cp .env.example .env
| Command | What it does |
|---|---|
make build-image |
Builds ${CONTAINER_REGISTRY}/analytics/${IMAGE_NAME}:${IMAGE_TAG} |
make run-local |
Runs the image via docker-compose-dev.yaml |
make push-registry |
Pushes to the container registry |
Key Docker files:
| File | Purpose |
|---|---|
Dockerfile |
Multi-stage build (adapts to the chosen package manager) |
docker-compose-build.yaml |
CI/CD image build |
docker-compose-dev.yaml |
Local dev/test run with secrets and env vars |
docker-compose.yaml |
Production deployment spec |
Project structure
├── src/{{ python_package_import_name }}/ # importable package
├── tests/ # pytest test suite
├── docs/ # Jupyter Book documentation
{% if is_datascience_project -%}
├── data/
│ ├── raw/ # original, immutable source data
│ ├── interim/ # intermediate transformed data
│ ├── processed/ # final, analysis-ready data
│ └── external/ # data from third-party sources
{% endif -%}
├── assets/ # images, figures
├── reports/ # generated reports and outputs
├── examples/ # usage examples
├── scratch/ # throwaway experiments (not tested)
└── secrets/ # local credentials — never committed
VS Code setup
Recommended extensions (install via the Extensions panel or .vscode/extensions.json):
| Extension | Purpose |
|---|---|
ms-python.python + ms-python.pylance |
Python language support |
charliermarsh.ruff |
Linting and formatting (replaces black + isort) |
ms-python.mypy-type-checker |
Type checking |
Formatting on save and import sorting are pre-configured in .vscode/settings.json.
Updating the template
To pull in improvements from the project template into this project:
copier update . --trust
Copier merges template changes with your local edits. Review the diff carefully before committing.
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aio_sensorthings-0.1.0.tar.gz.
File metadata
- Download URL: aio_sensorthings-0.1.0.tar.gz
- Upload date:
- Size: 157.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0e90b3b98748fae83eb04af5c68e77e2f8103cfb1da04a68d80a891ca63efdf
|
|
| MD5 |
a5f35e757f3e24e9d9b69e3429ad9a04
|
|
| BLAKE2b-256 |
80fae629822c59895e4926f5a8d63773a2e593f8f45849ca2e291ea331654984
|
File details
Details for the file aio_sensorthings-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aio_sensorthings-0.1.0-py3-none-any.whl
- Upload date:
- Size: 50.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd030b91a8aa05f21cfdbb47c896445587f83f571b6adbf48224ef46ce601beb
|
|
| MD5 |
48cffea6913fecde89c1409d5bea6440
|
|
| BLAKE2b-256 |
a2c13473b24472cef9798ae2c03c37f1c7e4d3d203fafd862888e50d37bc8d88
|