Skip to main content
https://github.com/inveniosoftware/citeproc-py-styles/workflows/CI/badge.svg https://img.shields.io/coveralls/inveniosoftware/citeproc-py-styles.svg https://img.shields.io/pypi/v/citeproc-py-styles.svg

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]))

Release files for citeproc-py-styles 0.1.6

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.1.6
File Size Uploaded
citeproc_py_styles-0.1.6.tar.gz 6.3 MB Details

Built distribution (wheel)

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

Total release size: 21.9 MB

Release files / citeproc_py_styles-0.1.6.tar.gz

Download URL citeproc_py_styles-0.1.6.tar.gz
Size 6.3 MB
Tags Source
SHA-256 checksum
How to use checksums
6499914e1425f2d7275f15d8c8417982314b5b79c1b63a9669719fdaeb833169
BLAKE2b-256 checksum
How to use checksums
8fc988cdec9fccaea98f97a23b0c8826b3824f8c878ba84dfd4a17dd667d7541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

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

Download URL citeproc_py_styles-0.1.6-py2.py3-none-any.whl
Size 15.5 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f1720fe9004c88ea9117a7312e9f44e5753cf5436a995b56f77297aaee03590a
BLAKE2b-256 checksum
How to use checksums
7ed4c58e3bf20e37fadaae939d9f98fe90ca37f219ec6a1765aacd4af19396dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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