Skip to main content

asort

PyPI version License: Apache-2.0 ASort CI codecov Downloads black CII Best Practices DeepSource

asort for __all__ your __all__ lists

asort is a Python utility / library to sort imports items in an __all__ list alphabetically It provides a command line utility, Python library and pre-commit support to quickly sort all your imports. It requires Python 3.7+ to run but supports formatting any version of Python code.

Works seemlessly with black and isort with no configuration needed

Before asort:

from my_lib import Object
from my_lib import Object3
from my_lib import Object2

__all__ = [
  "Object",
  "Object3",
  "Object2",
]

After asort:

from my_lib import Object
from my_lib import Object3
from my_lib import Object2

__all__ = [
  "Object",
  "Object2",
  "Object3",
]

Installing asort

Installing asort is as simple as:

pip install asort

Using asort

See usage examples on our documentation

Metadata

Release files for asort 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asort 0.1.3
File Size Uploaded
asort-0.1.3.tar.gz 9.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asort 0.1.3
File Interpreter ABI Platform
asort-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / asort-0.1.3.tar.gz

Download URL asort-0.1.3.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dc7965a9b5012199cf3d76622438de5563b9c16e2ef832c80641476a0cd27e75
BLAKE2b-256 checksum
How to use checksums
ff5d0448203c4eb290b26d703a9f42098ac8c3ee60f04549408c314b3471f9d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.5

Release files / asort-0.1.3-py3-none-any.whl

Download URL asort-0.1.3-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d08408e2e21b884554216c829607a7af8bda15b60e71fb72f209a3b4b6c8b35d
BLAKE2b-256 checksum
How to use checksums
68c4eef6b8786b32c7b864ca351c57f65f97ab450b254977be76ceba689f84e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page