protfasta
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
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.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| protfasta-0.1.24.tar.gz | 82.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| protfasta-0.1.24-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 156.0 kB
Release files / protfasta-0.1.24.tar.gz
| Download URL | protfasta-0.1.24.tar.gz |
|---|---|
| Size | 82.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ac65d0bc9b0543ecd1b76bd49675d588c09ee4009d5f597d7c522af46b5f1de
|
|
BLAKE2b-256 checksum How to use checksums |
a51f4ab6cc6f3578ddc6925312346cae081491fcb6a0cf1f2c7336116ee021a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / protfasta-0.1.24-py3-none-any.whl
| Download URL | protfasta-0.1.24-py3-none-any.whl |
|---|---|
| Size | 73.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88cb8871f842704e2055455942bd6255f4a4620210f640c64a1ca5ba9a57274a
|
|
BLAKE2b-256 checksum How to use checksums |
55f49b9a473613b9472f6c1341e45b4ca88b027e6155a924abe00b1cf48245c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|