Skip to main content

AppRC

CI License Python PyPI

uv Ruff Pyright pytest

AppRC provides configuration, installation, and lifecycle management for Python applications. Declare typed settings, opt into independent resources such as config or cache, and add the interfaces your users need. When you ship a native installer, AppRC can also register the command, keep the app's resource locations across updates, and provide repair and uninstall.

Main dependencies:

  • typed-settings: Convert and validate typed application settings.
  • python-dotenv: Read setting values from dotenv files.
  • platformdirs: Resolve native per-user application paths.
  • filelock: Serialize persistent configuration and resource operations.

AppRC setting layers, optional workspaces, and application code
Fig. 1 - Graphical Abstract: AppRC resolves typed settings from layered sources, applies optional workspace overrides, and shares one declaration across application code and configuration tools.


Use the SDK Ship an application Use an installed application
Install the Python SDK and resolve typed settings. Build a release package and verify installation. Install or register the app, then run it or manage it.

Table of Contents

  1. AppRC
  2. Installation
    1. Install the AppRC SDK
    2. Install from a Cloned Repository
    3. Uninstall
  3. Usage
    1. Load settings
    2. Choose application paths
    3. Save user settings
    4. Add terminal commands
    5. Add a Gradio settings page
  4. Ship an application
  5. Use an installed application
    1. Choose an installation route
    2. Run the application
    3. Maintain the application
  6. Documentation


Installation


Install the AppRC SDK

These SDK packages require Python 3.12 or newer. The commands below install the published SDK from PyPI. The distribution and lifecycle guides describe AppRC on main. The features available in a downloaded installer depend on the application release that built it.

Command Includes
python -m pip install apprc Core configuration, Typer commands, prompts, and Textual editor.
python -m pip install apprc-core Configuration and noninteractive path/maintenance APIs.
python -m pip install apprc-gui Configuration and Gradio settings editor.

apprc-core and apprc use import apprc; apprc-gui provides from apprc_gui import ConfigEditor. Terminal and GUI distributions install the matching apprc-core release.

Caution

Version 0.32 makes a breaking API and on-disk configuration cutover. Existing Storage, storage, apprc_dir, and --storage integrations must be changed to the new contracts described in the upgrade guide. AppRC does not move, rename, scan, delete, or automatically upgrade old user files. Keep any old files as-is and deliberately configure the new paths.

CI runs on Ubuntu: core checks cover Python 3.12, 3.13, and 3.14, and GUI/browser checks cover Python 3.12. Windows and macOS runtime and installer code remain, but those platforms are unverified by this CI policy and have known native test failures.


Install from a Cloned Repository

Follow the development environment instructions for editable installs of the core and optional terminal/GUI distributions. Ordinary pip installations do not require uv.


Uninstall

Use the same Python environment as for installation. To remove all three AppRC distributions:

python -m pip uninstall apprc apprc-gui apprc-core

Remove only the distributions you no longer need. Keep apprc-core if another installed application or library depends on it. Package removal does not purge application configuration, data, cache, state, or workspaces; application-owned resource maintenance is a separate, explicit operation.


Usage


Load settings

Create one AppRC, register config sections, then build typed settings from a ResolvedConfig:

import apprc as rc

MyRC = rc.AppRC(app_id="demo")

@MyRC.config("client", prefix="DEMO_")
class ClientSettings(rc.Config):
    timeout: int = rc.field("DEMO_TIMEOUT", default=30)

resolved = MyRC.resolve(environment={"DEMO_TIMEOUT": "10"})
settings = resolved.build(ClientSettings)
assert settings.timeout == 10

resolve() reads configuration and captures a snapshot; build() converts values and validates required fields. Add dotenv files or packaged defaults when required. Provenance records which source supplied each value. Resolution does not write files or alter os.environ.


Choose application paths

Declare only the managed components the application uses:

import apprc as rc

MyRC = rc.AppRC(
    app_id="demo",
    paths=rc.Paths(cache=True),
    layout=rc.Layout.native(),
)

paths = MyRC.paths()                   # inspect; no filesystem writes
cache_dir = MyRC.ensure_path("cache")  # create privately and record ownership

Paths independently enables config, appdata, cache, and state. Layout.native() uses platform user locations; Layout.single_root(root) places enabled categories beneath one explicit root. AppPaths reports disabled locations as None; ensure_path(kind) initializes only the requested component. See path declarations and the path reference.

Managed installers preserve the selected layout in a durable installation record. Reinstallation reuses that choice; an invocation override does not rewrite it. Single-root groups the enabled application resource directories, not the Python environment or fixed native installation support. Plain pip install -e . remains independent of this optional installation workflow.

Enable the resources your app needs

A cache-only declaration gives your code a cache directory on demand. Add a config directory and user dotenv if people need to save preferences. The capability map shows how workspaces and other resources fit.

Applications that need selectable named working directories declare Workspaces(). A WorkspaceManager manages the registry and archive operations separately from AppPaths; selecting a workspace does not relocate configuration, cache, or state. registry=False permits direct-directory selection without enabling config. Call WorkspaceManager.initialize_workspace(root) or use workspace init PATH to prepare the workspace dotenv; this writes no config or registry file.


Save user settings

user_dotenv=rc.UserDotenv() opts into apprc.user.env inside the enabled config directory. UserDotenv requires paths=rc.Paths(config=True); it never enables config implicitly. Obtain a ConfigManager with MyRC.manage() for settings inspection, setup, and reviewed edits. The saved-preference guide contains a complete example. Saved secrets use private companion files; the secret explanation describes their limits.


Add terminal commands

Use rc.cli.mount_app_cli(app, MyRC) to add configuration and application maintenance alongside the host's commands. config and workspace appear when their capabilities exist; app paths and app doctor are always available. config setup [--adopt] [--yes/-y] initializes only enabled user configuration. Installation offers configuration only for missing required user settings without fallbacks, and skips the offer for non-interactive input. Setup completion points to app paths --json and app doctor --json; AppRC provides descriptions for its generated options in each command's --help. The maintenance group defaults to app and can be renamed with maintenance_group_name. The returned mapping identifies actual mounted paths, such as app.cache, for application extensions. See the Typer guide and command reference.

Resource commands are nested under app: app data backup/restore, app cache prune/clear, and app state prune/reset appear only for supported operations. Declaring a path alone does not enable these commands or create its directory. app repair, app uninstall, and app migrate require installation_management=True, which also enables editable app install -e. Managed installation uses the native setup executable or an explicit installer_entrypoint callable. There are no resource init or purge CLI aliases. Python ensure_path and maintenance purge planning remain available with their existing ownership and safety boundaries.

The removal guide covers the uninstall preview, confirmation, and what each option retains.

Passing launcher_spec and launcher_handlers adds optional root launch, which opens the existing Textual management launcher. It is separate from a foreground application command and from saved distribution launch support. Hosts can opt into separated root help panels with typer.Typer(cls=rc.cli.AppRCRootGroup): host commands and options appear first in cyan, AppRC panels follow in magenta, and common help/completion options appear last in a dim panel. Descriptions stay neutral; nested help stays standard. See root help and color controls.

The Textual editor and Gradio editor edit config settings; when a workspace registry exists, callers supply the separate WorkspaceManager. Editors do not initialize application state merely by opening.


Add a Gradio settings page

Embed apprc_gui.ConfigEditor(manager) in an application-owned Gradio Blocks. If the application declares registry-backed workspaces, provide workspaces=MyRC.workspaces() as well. The Gradio guide shows the integration.


Ship an application


Use the optional distribution authoring APIs to build a release package from a committed, locked project snapshot. The application supplies a build backend. Final executables and SHA256SUMS go in ignored dist/. Build intermediates stay in .cache/apprc/.

In an opted-in source checkout, the host command provides dist build and dist check. Installation management also enables dist test. Use -t with build or check for the current platform, and dist test --managed for guided testing of a release installation. With AppRCRootGroup, these commands live under AppRC: Commands.

Configure One-line installer (OLI) generation with dist build --olis-repo OWNER/REPO or RELEASE_REPO_OLIS. Publish the installer executables and checksums as application release assets and host the OLI scripts at a trusted URL. An OLI selects an executable from the application's latest published GitHub release.

From a commit to an installed command

Build from committed source, publish a checksummed setup, and let setup prepare the application runtime on the recipient's machine. Follow the release package guide for build and verification steps.

See the authoring requirements for toolchain prerequisites, application icons, installation messages, and configuring the app's default action.


Use an installed application


Choose an installation route

The application supplies the release assets, command name, and installation instructions. Start with the route that matches what you have.

Route Where to start Result
One-line installer (OLI) Run the app's published command. It downloads, verifies, and launches the released executable. Release installation
Released Binary Executable (RBE) Verify and run the binary from the application's release. Release installation
Editable Source Checkout (eSC) Prepare and register a checkout with <app> app install -e in its environment. Editable installation
Source Build (SB) Build or reuse a local executable with <app> app install in a distribution-enabled checkout. Release installation

Installation reports the applicable steps, resolved paths, and final result. An application can show a Next step after successful setup. On Windows, double-clicked setup displays its result before asking you to press Enter.


Run the application

Use the published command in a terminal or open an installed shortcut. Setup can create a desktop shortcut, and editable registration also accepts <app> app install -e --desktop. If setup changed user PATH, open a new terminal before using the command. A bare command runs the action chosen by the application. For example, it may start a local server and open its browser UI. See the launch guide for command publication and shortcuts.


Maintain the application

Run a newer installer to update a release installation. Update a registered checkout using Git and uv. Use the inspection and repair guide to diagnose the saved installation. Review the uninstall preview before removing the program and its managed resources.

Update through the same command

Setup prepares and validates a replacement while the current runtime is still selected. On success, the installed command switches to the new runtime and keeps the saved resource locations. See the lifecycle diagram and recovery details.


Documentation

Using the project

  • Documentation — Start here for component names and learning order.
  • How-to user guides — Complete specific tasks with independent examples.
  • Examples — Choose and run complete application setups, including cache-only.
  • Explanations — Understand components and how they connect.
  • References — Look up exact APIs, files, commands, and behavior.

Contributing and maintaining

Metadata

Release files for apprc-core 0.38.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 apprc-core 0.38.0
File Size Uploaded Provenance Actions
apprc_core-0.38.0.tar.gz 801.5 kB Without provenance Details for apprc_core-0.38.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apprc-core 0.38.0
File Interpreter ABI Platform Actions
apprc_core-0.38.0-py3-none-any.whl Python 3 none any Details for apprc_core-0.38.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / apprc_core-0.38.0.tar.gz

Download URL apprc_core-0.38.0.tar.gz
Size 801.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b9f15b598ec57ed749dfd90e5bbf4d8e72ba43e5ef1a17455b65041f41585cec
BLAKE2b-256 checksum
How to use checksums
93f2428e31616d0375807afe8b77e083a7e753a5a9a73af2705d589d6d9fcf84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / apprc_core-0.38.0-py3-none-any.whl

Download URL apprc_core-0.38.0-py3-none-any.whl
Size 473.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4126d99ac36440f6e398f3888d414bd8306a1ee6affd778f8db93925ff2f51dd
BLAKE2b-256 checksum
How to use checksums
7156ef8fd19e5235e017c4d95313d27408322180672ad0d160c03aed117d14f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for apprc-core 0.38.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