This release is a pre-release and may not be stable for production use.
refrncr
Reference data without the enterprise baggage.
Refrncr is a lightweight application for managing reference data that is accurate, shared and easy to consume. Create datasets with defined fields and identifiers, organise ownership through teams, and control who may edit, export or access data through the API. Work safely in Concepts: review changes, import versions, restore deleted records, and publish only when ready. Built-in validation, audit history, versioning and import flows protect data quality without adding enterprise complexity. Teams can browse published data in the web interface, download it as Excel, CSV, JSON or retrieve it through a REST API with personal API keys. Run it locally with your database and deployment setup.
Read the Refrncr documentation for product guidance, concepts and practical workflows.
Refrncr is source-available software licensed under the Elastic License 2.0 (ELv2). You may use, copy, modify and self-host Refrncr, including inside your organisation. You may not offer Refrncr to third parties as a hosted or managed service that gives them access to a substantial set of its features, circumvent any license key functionality, or remove licensing and copyright notices. See LICENSE for the full terms.
Security
Report suspected vulnerabilities privately through the process in SECURITY.md. It explains the preferred confidential channel, what to include and the coordinated-disclosure process. Do not open a public issue, pull request or discussion for a suspected vulnerability.
Third-party dependencies are not bundled: pip installs them separately from their own
distributions, and they remain under their own licenses. This includes the PostgreSQL driver
psycopg, which is licensed under the LGPL-3.0. Licenses for assets shipped with Refrncr are
listed in src/refrncr/static/licenses/.
See the user guide to importing Records for how imports compare a file with the current Draft.
Quick start
Install the release candidate from PyPI in an isolated environment with:
pipx install --pre refrncr
refrncr start
For development from a source checkout, create a virtual environment and install the Community application with:
python -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"
.venv/bin/refrncr start
Open http://127.0.0.1:8000. The server binds only to the local loopback interface by default. It uses a persistent embedded SQLite database, creates its parent directory, and applies all Community database migrations before accepting requests. Docker and PostgreSQL are not required for this quick start.
Maintainers build releases from a committed, hash-verified runtime lock while the published package metadata retains compatible dependency ranges for ordinary consumers. See the release supply-chain guide for the controlled GitHub Release, protected-environment approval and PyPI Trusted Publishing process.
Create the first administrator
On a new installation, open http://127.0.0.1:8000/setup. Enter the administrator's email address and display name, and choose a password of at least 12 characters. After creating the administrator, sign in at http://127.0.0.1:8000/login. The setup page is available only while the installation has no users; after the first administrator exists it redirects to the login page.
The first administrator can instead be created from the command line before starting the server:
refrncr user create-admin \
--email admin@example.com \
--display-name "Administrator"
The command prompts for the password and confirmation so the password does not
appear in command history. It uses the same default database as refrncr start.
When starting with --database-path or --database-url, pass the same option to
user create-admin so the administrator is created in the intended database.
Only the first administrator can be bootstrapped this way; create later users
from Settings → Users while signed in as an administrator.
An installation operator can recover the password of an existing active administrator:
refrncr user recover-admin --email admin@example.com
The command requires an interactive terminal and reads the new password and confirmation
without echoing them. It does not migrate the database, revokes all existing sessions after a
successful reset, and records an actor-free recovery event in the Community audit log. An
unknown, non-administrator, disabled or deleted account is rejected uniformly; recovery never
reactivates an account. Pass the same --database-path or --database-url used by the server.
The default database is stored in the operating system's user application-data directory:
- Linux:
$XDG_DATA_HOME/refrncr/refrncr.db, or~/.local/share/refrncr/refrncr.dbwhenXDG_DATA_HOMEis unset; - macOS:
~/Library/Application Support/refrncr/refrncr.db; - Windows:
%LOCALAPPDATA%\refrncr\refrncr.db.
Configuration precedence is command-line option, then environment variable, then default:
refrncr start --database-path ./refrncr.db --host 127.0.0.1 --port 8000
refrncr start --database-url postgresql+psycopg://user:password@localhost/refrncr
The corresponding environment variables are REFRNCR_DATABASE_URL, REFRNCR_HOST, and
REFRNCR_PORT. --database-path is a convenient SQLite-only override; --database-url supports
any configured SQLAlchemy database URL. SQLite is the zero-configuration default; PostgreSQL is
supported for deployments that configure a PostgreSQL SQLAlchemy URL. Explicit trusted reverse
proxies can be configured with repeatable --trusted-proxy IP_OR_CIDR options or the comma-separated
REFRNCR_TRUSTED_PROXIES environment variable; direct Community use requires no proxy setting.
Configuring a trusted proxy disables plain-HTTP loopback cookies, so proxy deployments require
HTTPS.
Development
Development uses Python 3.12 or newer. From the repository root:
python -m venv .venv
.venv/bin/python -m pip install -e ".[dev]"
For the exact CI-matching tool versions, install the editable project and the hash-pinned development lock instead:
.venv/bin/python -m pip install -e .
.venv/bin/python -m pip install --require-hashes -r requirements/dev.txt
The default local test run uses SQLite and excludes tests marked slow:
.venv/bin/python -m pytest -m "not postgres"
Run the complete SQLite suite, including slow tests, with:
.venv/bin/python -m pytest --run-slow -m "not postgres"
The CI-equivalent parallel run uses all available workers:
.venv/bin/python -m pytest --run-slow -n auto --durations=50 -m "not postgres"
CI prints collection counts for each database and reports the slowest 50 cases. A call that
takes more than two seconds should be marked slow; CI reports unmarked cases above that
threshold as warnings without making timing alone fail the build.
The full database matrix also runs the tests marked postgres. PostgreSQL 16 is the supported
CI version. Start a local PostgreSQL 16 container, set REFRNCR_TEST_POSTGRES_URL, and run:
docker run --rm --name refrncr-postgres -e POSTGRES_DB=refrncr_test -e POSTGRES_USER=refrncr -e POSTGRES_PASSWORD=refrncr -p 5432:5432 postgres:16
export REFRNCR_TEST_POSTGRES_URL='postgresql+psycopg://refrncr:refrncr@127.0.0.1:5432/refrncr_test'
.venv/bin/python -m pytest
GitHub Actions runs the regular and slow suites as separate jobs on every pull request:
test-sqlite, test-sqlite-slow, test-postgres, and test-postgres-slow. The regular SQLite job
has a 25-minute limit; the other jobs have 15 minutes for slow tests and 20 minutes for regular
PostgreSQL tests. The coverage job combines artifacts from the two regular-suite jobs, while the
slow-suite jobs remain independent checks and should be configured as required checks in repository
branch protection.
To run the suite with branch coverage locally, use the installed development extra:
.venv/bin/python -m pytest --cov
The configured coverage floor is 90%; migration files are excluded because Alembic owns their execution. The optional quality tools can be installed and run with:
.venv/bin/python -m pip install -e ".[quality]"
.venv/bin/python -m radon cc src/refrncr -s -a
.venv/bin/python -m bandit -r src/refrncr
.venv/bin/python -m vulture src/refrncr
.venv/bin/python -m pip_audit
The repository checks are:
| Check | Command | Local use |
|---|---|---|
| Tests | .venv/bin/python -m pytest |
Required; PostgreSQL tests run when configured |
| Ruff lint | .venv/bin/python -m ruff check . |
Required |
| Ruff format | .venv/bin/python -m ruff format --check . |
Required |
| Pre-commit | .venv/bin/python -m pre_commit run --all-files |
Required before review |
| Coverage | .venv/bin/python -m pytest --cov |
Branch coverage; fails below 90% |
| Optional quality tools | .venv/bin/python -m pip install -e ".[quality]" |
Radon, Bandit, Vulture and pip-audit; not a CI gate |
| CI-only security/release jobs | GitHub Actions | Run by CI |
Without REFRNCR_TEST_POSTGRES_URL, PostgreSQL-marked tests are skipped with an explicit reason;
SQLite tests still run. Use pytest --durations=50 when profiling test feedback.
Health and operational logs
After the existing automatic migration/bootstrap sequence succeeds, GET /healthz
reports process liveness and GET /readyz reports runtime database and Alembic-head
readiness. Probes are public, data-free and non-cacheable. refrncr start remains
fail-closed when its pre-start migration or bootstrap fails. Run migrations and
bootstrap successfully before relying on either probe.
At an interactive terminal the CLI prints a compact ready message with the browser URL;
successful request noise stays hidden. When stdout is redirected or collected, it emits
privacy-safe JSON lines instead. --log-level overrides REFRNCR_LOG_LEVEL for that
process; both accept DEBUG, INFO, WARNING, ERROR or CRITICAL. Interactive debug
uses only safe route categories, status, duration and request IDs and aggregates repeated
requests. Set NO_COLOR to disable terminal accents. Binding --host 0.0.0.0 displays
localhost as the browser URL and states that every network interface is bound; no external
address is discovered. Every HTTP response receives an X-Request-ID. See the
runtime operations guide for probe usage, logging
fields and redaction boundaries.
Community operators are responsible for database backup scheduling, protected storage, encryption, access and retention. See the operator backup and recovery guide for verified SQLite and PostgreSQL procedures; REFRNCR does not provide a backup service.
Community user foundation
The Community application owns exactly one Organisation and supports multiple local users. On
application construction the Organisation is created when absent; /setup creates the first user
as its administrator. Administrators can then create, enable, disable, soft-delete, and change the
email address of users through the Flask web boundary. Passwords use Argon2id and authentication
uses database-backed server-side sessions.
The loopback and HTTPS cookie/session policy is documented in Browser session security.
SQLite supports the zero-infrastructure local experience. PostgreSQL is recommended for serious concurrent multi-user operation.
The selected Argon2id parameters, per-operation resource implications, and opt-in benchmark are documented in Argon2id resource profile.
Community teams
Administrators can create, rename, list, and delete multiple teams within the single Community installation. Team names preserve their NFC-normalized display form and are unique using Unicode case-insensitive comparison. Administrators can add active users to teams and remove memberships; users may belong to multiple teams, and teams may exist without members. Disabling or soft-deleting a user retains their memberships. Ordinary active users can view their own teams. Teams represent data domains: each Dataset has exactly one owning team, whose current members can maintain and export it. Team deletion requires reassignment of every owned Dataset first.
Every active Community user can discover and read all Datasets and create a Dataset for one of their teams. Administrators can create for any team and manage ownership and additional user/team export access. Read access alone does not permit export. Historical Dataset viewer/editor/admin Grants and creator metadata confer no Dataset rights. Grants are deprecated programmatic compatibility data; browser and current Community APIs use named capabilities instead.
Existing installations must resolve ambiguous ownership before upgrading. See Dataset governance and operator preflight for the authorization model, migration mapping, concurrency contract and backup/restore procedure.
Audit coverage
Active Community administrators can browse Settings → Audit log. See audit history for filters, safe detail presentation, UTC/local time, cursor navigation and the read-only security boundary.
See the audit policy, functional inventory and coverage matrix for service-level audit contracts, transactional mutation events, import summaries and prepared export request semantics.
Published Dataset versions
Published Dataset versions are immutable complete snapshots with UTC effective dates. Ordinary users read the Current snapshot; active owning-team members and Community administrators manage the concept, publish and cancel Scheduled versions. Historical Grants grant no editing or publication rights and are not exposed through the browser or current Community API. See Dataset versions and upgrade preflight before upgrading an existing installation: every Dataset must have valid Fields, an identifier and valid values. The controlled upgrade creates one System-published Version 1 per valid Dataset and fails closed if any Dataset is invalid. Back up the database and stop writers before the upgrade.
API keys
API keys are available under Settings for active users when the installation
configures REFRNCR_API_KEY_PEPPER. For local development from a source checkout,
create the ignored .env file once:
umask 077
printf 'REFRNCR_API_KEY_PEPPER=%s\n' "$(openssl rand -hex 32)" > .env
.venv/bin/refrncr start
The CLI loads .env from its current working directory and does not override
variables already supplied by the launching environment. Stop and restart
refrncr after changing configuration.
Keep the generated value in protected installation configuration so every
restart receives the same pepper. Do not commit or log .env. Changing or losing
the pepper makes existing API keys unusable. See
configuration, troubleshooting, rotation and authentication.
These API keys authenticate requests to the Current published data REST API.
Current REST API
The same application serves read-only Dataset metadata and Records under /api/v1.
Use an API key in the Authorization Bearer header; browser sessions do not authenticate
API requests. Collections use offset/limit pagination and private conditional reads
support ETag/304 revalidation. See the REST contract and operations guide.
Public API documentation: open /api/docs for Swagger UI or /api/openapi.json
for the generated contract. Data endpoints require a Bearer API key and expose
Current published data only. See REST API usage and documentation security.
Metadata
Release files for refrncr 0.1.0rc4
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 | Actions |
|---|---|---|---|---|
| refrncr-0.1.0rc4.tar.gz | 1.6 MB | With provenance | Details for refrncr-0.1.0rc4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| refrncr-0.1.0rc4-py3-none-any.whl | Python 3 | none | any | Details for refrncr-0.1.0rc4-py3-none-any.whl |
Total release size: 2.9 MB
Release files / refrncr-0.1.0rc4.tar.gz
| Download URL | refrncr-0.1.0rc4.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9213df7e3545e5452c192740644a73f03971da546696dcf66bf3a2b24e7c809c
|
|
BLAKE2b-256 checksum How to use checksums |
a2ba924def37d5badf03439ec8213f97129dc3b70dd1f9a1462443b272d1cf57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logRelease files / refrncr-0.1.0rc4-py3-none-any.whl
| Download URL | refrncr-0.1.0rc4-py3-none-any.whl |
|---|---|
| Size | 1.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87c37a3e9d50f318d92694126178cb4af37f0a650159530f34a21780b9b343fb
|
|
BLAKE2b-256 checksum How to use checksums |
a41f771c68b9de2e591d6d46f591250ba0ce02982f9df72501cf13777d868107
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 24, 2026.
Transparency logSecurity for refrncr 0.1.0rc4
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
Both files in this release have been uploaded with provenance metadata.
Attestation for refrncr-0.1.0rc4.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 Nov 24, 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.