Skip to main content

citeproc-py-styles

CI License PyPI

About

This module is meant to be used as a static resources package, in order to make it easy to include the required Citation Style files (.csl) when using citeproc-py.

In order to avoid always installing ~40MB of files each time you include it in a project you could specify it as an extra in your setup.py, and only use it in the production environment or as an optional feature of your module. (Example setup.py)

The included files are originally hosted on the CSL Style Repository which belongs to the CSL Project.

Note: The style files are referenced as a git submodule. This means that this repository/package is pinned on a specific commit of the CSL Style Repository, and thus may not include any fixes or new styles that may have been added. Next versions of this repository will of course 'bump' the styles version to the latest commit, but this will not happen on a scheduled basis for the time being.

Installation

citeproc-py-styles is on PyPI so all you need is:

pip install citeproc-py-styles

Usage

This is a minimal example of how one could use citeproc-py-styles to render a citation with citeproc-py:

from citeproc import (Citation, CitationItem, CitationStylesBibliography,
                      CitationStylesStyle, formatter)
from citeproc.source.json import CiteProcJSON
from citeproc_styles import get_style_filepath

csl_data = json.loads("...")
source = CiteProcJSON(csl_data)

style_path = get_style_filepath('apa')
style = CitationStylesStyle(style_path)

bib = CitationStylesBibliography(style, source, formatter.plain)
bib.register(Citation([CitationItem('data_id')]))
print(''.join(bib.bibliography()[0]))

Metadata

Release files for citeproc-py-styles 0.2.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 citeproc-py-styles 0.2.0
File Size Uploaded Provenance Actions
citeproc_py_styles-0.2.0.tar.gz 6.5 MB Without provenance Details for citeproc_py_styles-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for citeproc-py-styles 0.2.0
File Interpreter ABI Platform Actions
citeproc_py_styles-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for citeproc_py_styles-0.2.0-py2.py3-none-any.whl

Total release size: 22.2 MB

Release files / citeproc_py_styles-0.2.0.tar.gz

Download URL citeproc_py_styles-0.2.0.tar.gz
Size 6.5 MB
Tags Source
SHA-256 checksum
How to use checksums
36d5ecc05647b026f0ec028dd206bb187f1c4189ded6b7f369fa4c9ddfa5148e
BLAKE2b-256 checksum
How to use checksums
b26d34ecfc22eb39f7a240f1262ac1bd4788e45d62c86698f1c3814350cfa551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / citeproc_py_styles-0.2.0-py2.py3-none-any.whl

Download URL citeproc_py_styles-0.2.0-py2.py3-none-any.whl
Size 15.7 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
96c460729e149da6cb0f95623f2e1d7266a4fa8d0608cc59abeac350383592c3
BLAKE2b-256 checksum
How to use checksums
26dc97b48d9990591284f2540d853ccd44a690a6f6bbe7b66094b4ea13f89f3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for citeproc-py-styles 0.2.0

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