Skip to main content

refers

reference code simply

Tests PyPI version

The refers library allows referencing plain text files from plain text files.

Usage:

  1. Add a @tag to the line that you want to reference: @tag:NAME
  2. To reference the tag use @ref followed by an optional option: @ref:NAME:OPTION
  3. run the refers library in the command line

The refers library will create new files with the outputted references in place of the tags. Changes of line placement, file name, relative path etc. are reflected in the updated references when the refers library is executed.

Installation

pip install refers

Reference Options

A reference has the following structure: @ref:NAME:OPTION. This will reference the named tag with the specified option. The available options are outlined in the table below.

Option Output
blank file name and line number
:file file name
:line line number
:link relative link to file
:linkline relative link to line in file
:fulllink full path link to file
:fulllinkline full path link to line in file
:quote quote line
:quotecode quote line of code without comment
:func get function name that contains line
:class get class name that contains line

Relative paths are given from the directory containing the pyproject.toml.

Future Work

Currently line continuation of code is only supported in python (using black). Future work will include supporting line continuation for all languages.

Metadata

Release files for refers 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for refers 0.0.4
File Size Uploaded Provenance Actions
refers-0.0.4.tar.gz 12.5 kB Without provenance Details for refers-0.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 25.6 kB

Release files / refers-0.0.4.tar.gz

Download URL refers-0.0.4.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
53422088b58de1ea1a4702c151dff3fe25f49ebda82331dc9f4dc3fff4bee019
BLAKE2b-256 checksum
How to use checksums
de6b6c410d806f1334e37a96fa896522f9975b025ac3db3a50291a8bbd3ce9af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.6 Windows/10

Release files / refers-0.0.4-py3-none-any.whl

Download URL refers-0.0.4-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b847df522d8a7b4968ef000051849cef8dfc864fc801a9337e1410e6c95aa52
BLAKE2b-256 checksum
How to use checksums
c36f6929141439c1345a059613ac136f13bc01410621099f594c90593bbed296
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.11.6 Windows/10

Security for refers 0.0.4

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.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files No provenance

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