Skip to main content

This is the spglib module.

Project description

Python bindings for C library for finding and handling crystal symmetries

Installation

The package is developed on GitHub. You can get the source for the released versions from the repository.

Note that the Python bindings will link to the system/environment installed Spglib (loaded from LD_LIBRARY_PATH or DYLD_LIBRARY_PATH), and it will default to a bundled version otherwise. To always use the system version of Spglib (e.g. in a lua-module environment) delete the bundled libraries libsymspg.so* in the python Spglib installation directory.

Using package distribution service

The easiest way to install python-spglib is to use the pypi package, for which numpy is required to be installed before the installation. A command to install spglib is:

$ pip install spglib

Conda is another choice:

$ conda install -c conda-forge spglib

These packages are made by Pawel T. Jochym.

Building from source

To build from source, make sure you have installed the build requirements in pyproject.toml. Then simply run the following in the root directory.

$ python -m build
$ pip install .

To include testing or documentation environments, simply include the relevant extras

$ pip install .[test]

Running tests

After installing the project with appropriate extras (testing), either from package manager or from source, simply run pytest in the current directory to test the python bindings

$ pytest

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

spglib-2.4.0.tar.gz (2.8 MB view hashes)

Uploaded Source

Built Distributions

spglib-2.4.0-cp312-cp312-win_amd64.whl (299.2 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

spglib-2.4.0-cp312-cp312-manylinux_2_35_x86_64.whl (819.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.35+ x86-64

spglib-2.4.0-cp312-cp312-manylinux_2_17_x86_64.whl (809.3 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

spglib-2.4.0-cp312-cp312-manylinux_2_17_aarch64.whl (803.7 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

spglib-2.4.0-cp312-cp312-macosx_11_0_arm64.whl (793.7 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

spglib-2.4.0-cp312-cp312-macosx_10_9_x86_64.whl (788.6 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

spglib-2.4.0-cp311-cp311-win_amd64.whl (299.3 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

spglib-2.4.0-cp311-cp311-manylinux_2_17_x86_64.whl (809.2 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

spglib-2.4.0-cp311-cp311-manylinux_2_17_aarch64.whl (803.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

spglib-2.4.0-cp311-cp311-macosx_11_0_arm64.whl (793.7 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

spglib-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl (788.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

spglib-2.4.0-cp310-cp310-win_amd64.whl (299.3 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

spglib-2.4.0-cp310-cp310-manylinux_2_17_x86_64.whl (809.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

spglib-2.4.0-cp310-cp310-manylinux_2_17_aarch64.whl (803.8 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

spglib-2.4.0-cp310-cp310-macosx_11_0_arm64.whl (793.7 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

spglib-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl (788.6 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

spglib-2.4.0-cp39-cp39-win_amd64.whl (299.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

spglib-2.4.0-cp39-cp39-manylinux_2_17_x86_64.whl (809.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

spglib-2.4.0-cp39-cp39-manylinux_2_17_aarch64.whl (803.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

spglib-2.4.0-cp39-cp39-macosx_11_0_arm64.whl (793.7 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

spglib-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl (788.6 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

spglib-2.4.0-cp38-cp38-win_amd64.whl (299.3 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

spglib-2.4.0-cp38-cp38-manylinux_2_17_x86_64.whl (809.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

spglib-2.4.0-cp38-cp38-manylinux_2_17_aarch64.whl (803.7 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

spglib-2.4.0-cp38-cp38-macosx_11_0_arm64.whl (793.7 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

spglib-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl (788.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

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