Skip to main content

pathseq

Documentation Github Build Status PyPI Version Supported Python Versions

A pathlib-first library for working with path sequences.

  • Multi-dimension ranges (e.g. animated udims)

  • pathlib-first API

  • Support for UDIM tokens

Getting Started

The following section demonstrates how to install pathseq and some basic usage. Full documentation is available here: https://pathseq.readthedocs.io/en/latest/

Installation

pathseq can be installed from PyPI:

pip install pathseq

Usage

For more detailed usage, see the documentation: https://pathseq.readthedocs.io/en/latest/

Now, let’s get started:

>>> from pathseq import PathSequence
>>> seq = PathSequence("tests/fixtures/simple/images.1-5####.exr")
>>> for path in seq:
...     path
...
PosixPath('tests/fixtures/simple/images.0001.exr')
PosixPath('tests/fixtures/simple/images.0002.exr')
PosixPath('tests/fixtures/simple/images.0003.exr')
PosixPath('tests/fixtures/simple/images.0004.exr')
PosixPath('tests/fixtures/simple/images.0005.exr')

>>> seq = PathSequence("tests/fixtures/simple/images.1-5####.exr")
>>> for path in seq:
...     path.touch(exist_ok=True)
...
>>> seq2 = PathSequence("tests/fixtures/simple/images.####.exr")
>>> for path in seq2.iter_existing_paths():
...    path
...
PosixPath('tests/fixtures/simple/images.0001.exr')
PosixPath('tests/fixtures/simple/images.0002.exr')
PosixPath('tests/fixtures/simple/images.0003.exr')
PosixPath('tests/fixtures/simple/images.0004.exr')
PosixPath('tests/fixtures/simple/images.0005.exr')

>>> seq = PathSequence("tests/fixtures/simple/images.1-5####.exr")
>>> seq.parent
PosixPath('tests/fixtures/simple')
>>> seq.parent / PathSequence("images.1-5####.exr")
... PathSequence("tests/fixtures/simple/images.1-5####.exr")

>>> anim_udims = PathSequence("/path/to/textures.1011-1012<UDIM>_1-3#.tex")
>>> for path in anim_udims:
...     path
...
PosixPath('/path/to/textures.1011_1.tex')
PosixPath('/path/to/textures.1011_2.tex')
PosixPath('/path/to/textures.1011_3.tex')
PosixPath('/path/to/textures.1012_1.tex')
PosixPath('/path/to/textures.1012_2.tex')
PosixPath('/path/to/textures.1012_3.tex')

A wide range of sequence string formats are supported:

>>> from pathseq import LoosePathSequence
>>> seq = LoosePathSequence("/path/to/images.1-5####.exr")

>>> seq = LoosePathSequence("/path/to/1-5####_images.exr")
>>> seq[0]
PosixPath('/path/to/0001_images.exr')
>>> seq.suffixes
('.exr',)

>>> LoosePathSequence("/path/to/1-5####_archives.tar.gz").suffixes
('.tar', '.gz')

>>> seq = LoosePathSequence("/path/to/images.exr.1-5####")
>>> seq[0]
PosixPath('/path/to/images.exr.0001')
>>> seq.suffixes
('.exr',)

>>> LoosePathSequence("/path/to/images.1001-1005<UDIM>.exr")[0]
PosixPath('/path/to/images.1001.exr')

Contributing

Running the tests

Tests are executed through tox.

tox

Code Style

Code is formatted using ruff.

You can check your formatting using ruff’s check mode:

tox -e format

You can also get ruff to format your changes for you:

tox -e autoformat

Release Notes

Release notes are managed through towncrier. When making a pull request you will need to create a news fragment to document your change:

tox -e release_notes -- create --help

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License. See the LICENSE.rst file for details.

Metadata

Release files for pathseq 1.0.0.post0

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

Source distribution (sdist)

Source distribution for pathseq 1.0.0.post0
File Size Uploaded Provenance Actions
pathseq-1.0.0.post0.tar.gz 24.5 kB With provenance Details for pathseq-1.0.0.post0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pathseq 1.0.0.post0
File Interpreter ABI Platform Actions
pathseq-1.0.0.post0-py3-none-any.whl Python 3 none any Details for pathseq-1.0.0.post0-py3-none-any.whl

Total release size: 58.2 kB

Release files / pathseq-1.0.0.post0.tar.gz

Download URL pathseq-1.0.0.post0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d72ab0bc82957f442ef7b8eebb08e0e0946da577129fd3f23f517a16787d1f98
BLAKE2b-256 checksum
How to use checksums
2fcc5eeacabaf155961a73c8c13fa40173d2b926f5ef0b1f13fa1ea512683b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / pathseq-1.0.0.post0-py3-none-any.whl

Download URL pathseq-1.0.0.post0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f74a6be367f4f3345c6f337afe7cb94be1fa990abbfc37673fcf7129a01bf18f
BLAKE2b-256 checksum
How to use checksums
13489737baaab251cf0aeb5fed46e6373774c4d16f139871c5734a7893704072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for pathseq 1.0.0.post0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pathseq-1.0.0.post0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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