Skip to main content

No project description provided

Project description

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 develop inside 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.adapters or from numpy.linalg import norm, the function returns the top-level module: requests, numpy.
  • Non-.py files 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 extra native)

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 ... import patterns.

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

anima_core-0.1.1-cp313-cp313-win_amd64.whl (169.6 kB view details)

Uploaded CPython 3.13Windows x86-64

anima_core-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (319.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

anima_core-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (268.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

anima_core-0.1.1-cp312-cp312-win_amd64.whl (169.7 kB view details)

Uploaded CPython 3.12Windows x86-64

anima_core-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (319.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

anima_core-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (268.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

anima_core-0.1.1-cp311-cp311-win_amd64.whl (169.9 kB view details)

Uploaded CPython 3.11Windows x86-64

anima_core-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl (321.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

anima_core-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (271.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

anima_core-0.1.1-cp310-cp310-win_amd64.whl (170.1 kB view details)

Uploaded CPython 3.10Windows x86-64

anima_core-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl (321.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

anima_core-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (272.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

anima_core-0.1.1-cp39-cp39-win_amd64.whl (170.0 kB view details)

Uploaded CPython 3.9Windows x86-64

anima_core-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl (321.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

anima_core-0.1.1-cp39-cp39-macosx_11_0_arm64.whl (272.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file anima_core-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a544018071ec20929d2ef13313b4fef606c0a4adf903f67378282898f8c31560
MD5 ac85bb5f3b8accb43b3b3e976cf70db6
BLAKE2b-256 cd0c4aa66b0592171e074a7aee96e6b31e2cdf5e98e364887ccd0d5dcf4eeded

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a34bd0e9c456a2fd1e38a55686ea403ff5284600ddbae8ef9df9147b6b66ac8
MD5 c9ad5f5f296d3c48329e8644bcaab9e9
BLAKE2b-256 8ccd09f240f67fcaf78a8c95b8e31ca3800fab12aa3fed1666cc75531f16fbb2

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1ae97c05fddfeaaa5520c77ac754f562fdb17e9d932884173c0dd8132d8fa3b4
MD5 43a0602d4cbf737a688917c058e6ced4
BLAKE2b-256 5238c4a10ac0f0b3d3e8d155485730afd8d18bc10dd1bb2b61bd1f278c563f13

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7d68b8561f295f23d3a98c1b78f8f6c36ebf9727c5970587fca091bdee232844
MD5 1157f448932130f545598433a637eddf
BLAKE2b-256 b4383135d8054cfe4740a8c4323fcd47ff64006cb24df9e6384ce2bbe17e22fc

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71c2d060e6539543ce401d5930584ee875138438972e8fb5b846af19b4910406
MD5 d06ceb0956d7697cc75d101641a6c3df
BLAKE2b-256 22c74e43f2267a939470a9d483232b7cd5295852c8bf2942ab0be45d86b5c7b3

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7a092b8111db504bdf2279ef1fabe5545d3b7d87f6b8b9a5b7b888fe358ffb9
MD5 b9bb9d559114ee7002ded0c47141c61e
BLAKE2b-256 1a3bfca55556cf5ade157d705ac9093f6ee0f7d3cae15a92ebb0d5a245239b37

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 286e96144fbde607284135999350a99e2eb24a5baaa109c121301244f38c2a39
MD5 25d519ee76bbedfd30d5898c8e2a84a9
BLAKE2b-256 a84530d84887c1400d87498666bba5cbdfd8e5aa4cdfd8993d91da0f0d68af32

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3a9c3713790614f58f57a7f1418937b866dfbf8ff92021a864c2fae7f2c326df
MD5 78146493d606f3e89875b77e0a86f64a
BLAKE2b-256 6f50e3a0d49bbe1992b74a805c6d3673ebb8ca2c33679b721abe1c2f66867473

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0d1492b3c5d44abda79b128a982d9261cbc28e6ae1ad386d83226a7e115b68d5
MD5 aa358d23285de0cc1a7d4ec0718696b0
BLAKE2b-256 a44023b0346306b3738628ba48807c65305b1ba971065a84337ebf99f4e09413

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fa345e3033997f2482ec2ad4d016d9b0f2e5a77cbd939a4a6261a593e9ff8e3e
MD5 f95558e2e8b6e7afe0a25bf33d72768d
BLAKE2b-256 6632079883672d64367ee85083a17b0cb5bbbb993955b6a643078e0b73c2f5d8

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 25609bf0476f1dd96dacf012e1f427d3938fe9cfcf125ec30149e4cf9e63a4f8
MD5 ac6ab13dd8ec52e5c67a4b4f47e27cc3
BLAKE2b-256 5cf54bb983416f6d9274729f148c14629dc3070adb04752c98fa57374bc699f7

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc8febc76163a1ef7938451f2062f6ae20160aabaa502fd6ea2d8af5a8fe23c0
MD5 e8a0c41b5691074e26e8e23d3dcfd8bc
BLAKE2b-256 fb718ba296aa77b69c4c9d39e9a0d6616065d03ab2b2a968117ab7f268648a08

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 05ccd4115467efa8a14f361719ae81ad7e0abd484c8428eab292e1d9ca261722
MD5 70f8de4dd6f0e557289891aa28211104
BLAKE2b-256 78045c076e33bb7ef2ae4916c24bfdb730d4ad8b7043da937dc17f4e558240c2

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 311290da750f6b9bbad5d5b83e7c94bf07e16f30705ae8b279d47bc36b43b85e
MD5 eeb77864b26ba2d082fb6ff6321f43f4
BLAKE2b-256 3ea2f6697f8bdbafb954a80f7dbc30ecc8b775ec86e624aeadc510d96bdf2f6b

See more details on using hashes here.

File details

Details for the file anima_core-0.1.1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for anima_core-0.1.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 05ddede6628552d01dd7a0674c391433eff21042818047e5a86893cea6bd0652
MD5 2ad5721de913943ce9fa014af70463ea
BLAKE2b-256 92a1c6580444926fb5f258643506f8232376f5dedc78c0b680f41264e28a4ff7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page