Sphinx APA References
Introduction
This Sphinx extension allows you to have APA formatting of references in your book.
[!NOTE] This extension only modifies the formatting of references to comply with APA style. It does not handle citation management or reference generation; you will need to manage your references separately.
What does it do?
This extension modifies the way references are formatted in Sphinx-generated documentation to comply with APA (American Psychological Association) style guidelines for references. It ensures that citations and bibliographies are presented in a manner consistent with APA standards.
This entails forcing the following APA-specific formatting rules:
- Proper indentation and spacing for reference entries.
- Use of round brackets for in-text citations.
Installation
To use this extension, follow these steps:
Step 1: Install the Package
Install the module sphinx-apa-references package using pip:
pip install sphinx-apa-references
Step 2: Add to requirements.txt
Make sure that the package is included in your project's requirements.txt to track the dependency:
sphinx-apa-references
Step 3: Enable in _config.yml or conf.py
In your _config.yml file, add the extension to the list of Sphinx extra extensions (important: underscore, not dash this time) and specify the location of your bib file (note indentation of the bibtex file path specification; any number of bib files are allowed):
sphinx:
extra_extensions:
.
.
.
- sphinx_apa_references
.
.
.
bibtex_bibfiles:
- "<path_to_bib_file>/<bibfile>.bib"
or in your conf.py file, add the extension to the extensions list and specify the location of your bib file:
extensions = [...,"sphinx_apa_references",...]
bibtex_bibfiles = ["<path_to_bib_file>/<bibfile>.bib"]
Configuration
No additional configuration is possible. The extension automatically applies APA formatting to all references in your Sphinx documentation.
This extensions enforces the following settings, overriding any user-defined settings in _config.yml/conf.py:
bibtex_reference_style = "author_year_round"
Furthermore, the bibliography directive is adapted to always use the value apa for the style option if the user does not provide a value for the style option.
Examples and details
To see examples of usage visit this page in the TeachBooks manual.
Previous APA implementation
Prior to the creation of this Sphinx extension, APA referencing was implemented by including a local extension in a book subdirectory, as described in Issue 1090 from the Jupyter Book repository.
To upgrade from the previous setup, once this Sphinx extension is implemented in your book, the local extension files in _ext can be deleted and the four lines indicated below removed from your _config.yml file:
sphinx:
config:
.
.
.
bibtex_reference_style: author_year_round # remove
bibtex_default_style: myapastyle # remove
.
.
.
local_extensions:
apastyle: _ext/ # remove
bracket_citation_style: _ext/ # remove
Metadata
Release files for sphinx-apa-references 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sphinx_apa_references-1.0.1.tar.gz | 7.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_apa_references-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / sphinx_apa_references-1.0.1.tar.gz
| Download URL | sphinx_apa_references-1.0.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
390cabe12fb6dcd138fbe0fb4cfb0ab6d6ec72fb64b26d60cbd972aa17811c13
|
|
BLAKE2b-256 checksum How to use checksums |
5a85ae691d5e79d07e3365e4b96dc5fcad0170b649fd00673da58caf98c671e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 17, 2026.
Transparency logRelease files / sphinx_apa_references-1.0.1-py3-none-any.whl
| Download URL | sphinx_apa_references-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
234d31c748f1f4660784d4f34666e0d28da180c8ab292d0578b0b8ad6df0c87f
|
|
BLAKE2b-256 checksum How to use checksums |
cc6eb152dee1988fb4125b2fd882c63330d89706bccdf661c55230e5ed456c67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 17, 2026.
Transparency logSecurity for sphinx-apa-references 1.0.1
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sphinx_apa_references-1.0.1.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 Jan 17, 2026.
Transparency logA 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.