anima-core
anima-core is a small Rust library (with PyO3 bindings) that powers the import-scanning fast-path for AnimaDao. It provides a single high-level function optimized for speed and parallelism.
- 🚀 Fast: scans large codebases 5–10× faster than a pure-Python walker
- 🧩 Drop-in: used transparently by
anima-dao[native]; falls back to Python if absent - 🧱 No Rust required: prebuilt wheels for Linux, macOS and Windows
- 🧪 Safe: read-only filesystem access, no network calls
Installation
# end users (AnimaDao optional speedup)
uv pip install "anima-dao[native]"
# or install anima-core directly
uv pip install anima-core
# pip works as well:
# pip install anima-core
If wheels are unavailable for your platform, you can build from source:
pip install maturin && maturin developinside the repository.
Python API
from anima_core import scan_imports
# Accepts a list of filesystem roots (str paths); returns sorted unique top-level imports.
imports = scan_imports([".", "tests"])
print(imports[:10])
# ['click', 'httpx', 'packaging', 'pytest', '...']
- For lines like
import requests.adaptersorfrom numpy.linalg import norm, the function returns the top-level module:requests,numpy. - Non-
.pyfiles are ignored.
Compatibility
- Python: 3.10–3.13 (wheels); source build may work on newer
- OS: manylinux x86_64/aarch64, macOS universal2, Windows x86_64
- Consumers:
anima-dao >= 0.1.81(optional extranative)
Performance
On medium codebases (1–3k .py files), scan_imports is typically 5–10× faster
than a single-threaded Python AST walk, thanks to:
- parallel directory traversal (
rayon), - lightweight line scanning for
import/from ... importpatterns.
Actual speedups vary with filesystem and CPU.
Development
# Clone and enter the repo
git clone https://github.com/Absolentia/anima-core
cd anima-core
# Build a wheel (release)
pipx install maturin
maturin build --release -o dist
# Develop in-place (editable)
maturin develop
# Smoke-test the module
python -c "import anima_core; print(anima_core.scan_imports(['.'])[:5])"
Versioning & Stability
anima-core follows semantic versioning. The public Python API is intentionally small
and stable (scan_imports(paths: list[str]) -> list[str]).
License
MIT © Contributors
Metadata
Release files for anima-core 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 3.8 MB
Release files / anima_core-0.1.1-cp313-cp313-win_amd64.whl
| Download URL | anima_core-0.1.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 169.6 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a544018071ec20929d2ef13313b4fef606c0a4adf903f67378282898f8c31560
|
|
BLAKE2b-256 checksum How to use checksums |
cd0c4aa66b0592171e074a7aee96e6b31e2cdf5e98e364887ccd0d5dcf4eeded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | anima_core-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 319.8 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1a34bd0e9c456a2fd1e38a55686ea403ff5284600ddbae8ef9df9147b6b66ac8
|
|
BLAKE2b-256 checksum How to use checksums |
8ccd09f240f67fcaf78a8c95b8e31ca3800fab12aa3fed1666cc75531f16fbb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | anima_core-0.1.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 268.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1ae97c05fddfeaaa5520c77ac754f562fdb17e9d932884173c0dd8132d8fa3b4
|
|
BLAKE2b-256 checksum How to use checksums |
5238c4a10ac0f0b3d3e8d155485730afd8d18bc10dd1bb2b61bd1f278c563f13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp312-cp312-win_amd64.whl
| Download URL | anima_core-0.1.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 169.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7d68b8561f295f23d3a98c1b78f8f6c36ebf9727c5970587fca091bdee232844
|
|
BLAKE2b-256 checksum How to use checksums |
b4383135d8054cfe4740a8c4323fcd47ff64006cb24df9e6384ce2bbe17e22fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | anima_core-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 319.9 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
71c2d060e6539543ce401d5930584ee875138438972e8fb5b846af19b4910406
|
|
BLAKE2b-256 checksum How to use checksums |
22c74e43f2267a939470a9d483232b7cd5295852c8bf2942ab0be45d86b5c7b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | anima_core-0.1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 268.9 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b7a092b8111db504bdf2279ef1fabe5545d3b7d87f6b8b9a5b7b888fe358ffb9
|
|
BLAKE2b-256 checksum How to use checksums |
1a3bfca55556cf5ade157d705ac9093f6ee0f7d3cae15a92ebb0d5a245239b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp311-cp311-win_amd64.whl
| Download URL | anima_core-0.1.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 169.9 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
286e96144fbde607284135999350a99e2eb24a5baaa109c121301244f38c2a39
|
|
BLAKE2b-256 checksum How to use checksums |
a84530d84887c1400d87498666bba5cbdfd8e5aa4cdfd8993d91da0f0d68af32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | anima_core-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 321.1 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a9c3713790614f58f57a7f1418937b866dfbf8ff92021a864c2fae7f2c326df
|
|
BLAKE2b-256 checksum How to use checksums |
6f50e3a0d49bbe1992b74a805c6d3673ebb8ca2c33679b721abe1c2f66867473
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | anima_core-0.1.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 271.9 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0d1492b3c5d44abda79b128a982d9261cbc28e6ae1ad386d83226a7e115b68d5
|
|
BLAKE2b-256 checksum How to use checksums |
a44023b0346306b3738628ba48807c65305b1ba971065a84337ebf99f4e09413
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp310-cp310-win_amd64.whl
| Download URL | anima_core-0.1.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 170.1 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fa345e3033997f2482ec2ad4d016d9b0f2e5a77cbd939a4a6261a593e9ff8e3e
|
|
BLAKE2b-256 checksum How to use checksums |
6632079883672d64367ee85083a17b0cb5bbbb993955b6a643078e0b73c2f5d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | anima_core-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 321.3 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
25609bf0476f1dd96dacf012e1f427d3938fe9cfcf125ec30149e4cf9e63a4f8
|
|
BLAKE2b-256 checksum How to use checksums |
5cf54bb983416f6d9274729f148c14629dc3070adb04752c98fa57374bc699f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | anima_core-0.1.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 272.2 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bc8febc76163a1ef7938451f2062f6ae20160aabaa502fd6ea2d8af5a8fe23c0
|
|
BLAKE2b-256 checksum How to use checksums |
fb718ba296aa77b69c4c9d39e9a0d6616065d03ab2b2a968117ab7f268648a08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp39-cp39-win_amd64.whl
| Download URL | anima_core-0.1.1-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 170.0 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
05ccd4115467efa8a14f361719ae81ad7e0abd484c8428eab292e1d9ca261722
|
|
BLAKE2b-256 checksum How to use checksums |
78045c076e33bb7ef2ae4916c24bfdb730d4ad8b7043da937dc17f4e558240c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl
| Download URL | anima_core-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 321.3 kB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
311290da750f6b9bbad5d5b83e7c94bf07e16f30705ae8b279d47bc36b43b85e
|
|
BLAKE2b-256 checksum How to use checksums |
3ea2f6697f8bdbafb954a80f7dbc30ecc8b775ec86e624aeadc510d96bdf2f6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|
Release files / anima_core-0.1.1-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | anima_core-0.1.1-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 272.2 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
05ddede6628552d01dd7a0674c391433eff21042818047e5a86893cea6bd0652
|
|
BLAKE2b-256 checksum How to use checksums |
92a1c6580444926fb5f258643506f8232376f5dedc78c0b680f41264e28a4ff7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.9.3
|