ami
ami (Am I...?) is a collection of simple functions that allow your Python code to detect and adapt to the environment in which it is being run.
Examples
import ami
# Am I using Linux?
ami.using_linux()
# On an ARM CPU?
ami.using_arm_cpu()
# Am I running a virtual environment?
ami.using_virtualenv()
# Am I running in a container?
ami.using_container()
# Am I connected to the internet?
ami.online()
# Am I on battery power?
ami.using_battery_power()
Installation
Install the latest stable version of ami from PyPI:
pip install ami
If you'd like to add ami to a project managed with uv:
uv add ami
Requirements
- Python 3.11 or higher
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for ami 0.2.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 | |
|---|---|---|---|
| ami-0.2.0.tar.gz | 49.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ami-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.3 kB
Release files / ami-0.2.0.tar.gz
| Download URL | ami-0.2.0.tar.gz |
|---|---|
| Size | 49.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3dfc754e13a5cd2484ec23f8f7ec4050dfb9c244d5e02b26737fe9e9befed2a2
|
|
BLAKE2b-256 checksum How to use checksums |
16197015be4c5471f0939dfda2cf22c4763e5580351c0eafdc38f70dc06b235c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ami-0.2.0-py3-none-any.whl
| Download URL | ami-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83b12308f45bf780a676dbeab132b448227a93a5ac7168cff8ab3899c7a23d81
|
|
BLAKE2b-256 checksum How to use checksums |
26a8c5571dba5c790e325fb271a8ed66ad6eef9c02f25c352aa25e716f4c5484
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|