Skip to main content
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')

>>> LoosePathSequence("/path/to/images.1001-1005<UVTILE>.exr")[0]
PosixPath('/path/to/images.u1_v1.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.

Release files for pathseq 1.0.0

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
File Size Uploaded
pathseq-1.0.0.tar.gz 22.9 kB Details

Built distribution (wheel)

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

Total release size: 56.6 kB

Release files / pathseq-1.0.0.tar.gz

Download URL pathseq-1.0.0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
23dee08a5d8af811a693a0fce300db8d196df287d85c2e007abfbe858afe8f56
BLAKE2b-256 checksum
How to use checksums
b1e078c16fd6de158abd348bf14006b342d0bc0059d97f5b2ee37de6deccbc3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

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

Download URL pathseq-1.0.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2488f464db3bc5b80865e0b0c1dfd74501a67bd71acaa64094f24dcc838ddcee
BLAKE2b-256 checksum
How to use checksums
7d0ac63945f25ae64554e593502c79241971c3b23860a9cbb8947b76c1b5c5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

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