Skip to main content

protfasta

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

Release 0.1.27 (November 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, install it (the version file the package imports is generated at install time, so a bare clone won't import), and run the suite from the protfasta root

pip install .
pip install pytest
pytest --pyargs protfasta.tests --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.27

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.27
File Size Uploaded Provenance Actions
protfasta-0.1.27.tar.gz 108.9 kB Without provenance Details for protfasta-0.1.27.tar.gz

Built distribution (wheel)

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

Total release size: 204.0 kB

Release files / protfasta-0.1.27.tar.gz

Download URL protfasta-0.1.27.tar.gz
Size 108.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eebb2b4014925732d32a97845e4830f891d248269e4d3ed87c8bd1fd497f166c
BLAKE2b-256 checksum
How to use checksums
faacaec08ac60a09e9553ab570f50ac8ae61aa27d111fe91e1c825e795c6d81a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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.27-py3-none-any.whl

Download URL protfasta-0.1.27-py3-none-any.whl
Size 95.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a08827984509fd606ba1f6194ebf9060f7451edc9606036204b36cd96dd13e8f
BLAKE2b-256 checksum
How to use checksums
51340d520c98e35a7f72d4bcc812d1dc918b8deb98abb591d84956d10082a4b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}

Security for protfasta 0.1.27

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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