Skip to main content

protfasta

PyPI version Python versions Documentation Status License: MIT Last commit Open issues Stars Downloads

Release 0.1.24 (August 2026)

Overview

protfasta - a robust parser for protein-based FASTA files.

Documentation

For all documentation see https://protfasta.readthedocs.io/en/latest/.

For code see https://github.com/holehouse-lab/protfasta.

If you want to change the package rather than use it, ARCHITECTURE.md walks through how a read_fasta and a write_fasta call move through the modules.

Installation

protfasta has been tested on Linux and macOS. It should also work on Windows but we haven't tested it there yet.

protfasta can be downloaded and installed directly from PyPI using pip:

pip install protfasta

If this has worked, the pfasta command-line tool should be available from the command-line

pfasta --help

And you're done. This also means you can now import and use protfasta in your Python workflow.

Simple example

import protfasta

# sequences is now a dictionary where keys are FASTA headers and values are sequences.
sequences = protfasta.read_fasta('inputfile.fasta')

For files that are too large to fit in memory, read_fasta_stream() applies the same sanitization but yields one record at a time:

import protfasta

for header, sequence in protfasta.read_fasta_stream('huge.fasta'):
    ...

Running tests

To run tests on your environment, clone the source code and from protfasta root

cd protfasta/tests
pytest --verbose

To run the test suite over all supported Python versions we use tox; from the protfasta source root directory simply run

tox	

And the tests should run across Python envs 3.9 to 3.15 (experimental).

Errors and help

For bug reports or errors please raise an issue on this github repository (see the Issues tab at the top).

Changelog

The full release history lives in CHANGELOG.md.

Copyright (c) 2020-2026, Alex Holehouse - Holehouse lab. protfasta is released under the MIT license. The codebase is well structured and relatively simple, lending it to feature addition. We welcome pull-requests assuming contributed code maintains an appropriate level of clarity and robustness.

Acknowledgements

Many of the software-engineering tools and approaches used in the development of protfasta come from resources developed by the Molecular Sciences Software Institute.

Metadata

Release files for protfasta 0.1.25

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

Source distribution (sdist)

Source distribution for protfasta 0.1.25
File Size Uploaded
protfasta-0.1.25.tar.gz 85.5 kB Details

Built distribution (wheel)

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

Total release size: 161.6 kB

Release files / protfasta-0.1.25.tar.gz

Download URL protfasta-0.1.25.tar.gz
Size 85.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2b87b65f1e0e4346c069c76f6614daacc6341e58407e07f1ff344f533c6c4cd3
BLAKE2b-256 checksum
How to use checksums
f3ecc2c71f3656930fe5f1bab42e7078863e2c1da4be20d0f3ac70b30142f172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / protfasta-0.1.25-py3-none-any.whl

Download URL protfasta-0.1.25-py3-none-any.whl
Size 76.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61a116ba112337f3c421c274d6a7950a218d689c34cee8b9bccc5cf3ad44ece3
BLAKE2b-256 checksum
How to use checksums
e283672aa6fbfb94a41db7ebaad7f9a68d145bb6eaaf1c498539753c55e9d4d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.25 This release

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.18

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.5

1 release file

0.1.4.1

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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