Skip to main content

hyprland-schema

Typed Python schema for every Hyprland configuration option — with defaults, ranges, and descriptions. Generated from Hyprland's option-metadata source (ConfigDescriptions.hpp on v0.54.x and older, ConfigValues.cpp on v0.55.0 and newer, hyprwm/Hyprland#13817). Zero runtime dependencies — stdlib only.

Installation

pip install hyprland-schema

Usage

import hyprland_schema

# Schema version
print(hyprland_schema.HYPRLAND_VERSION)  # "v0.56.1"

# Lookup by key
border = hyprland_schema.OPTIONS_BY_KEY["general:border_size"]
print(border.type, border.default, border.min, border.max)
# int 1 0 20

# Filter by section
for opt in hyprland_schema.get_section("general"):
    print(f"{opt.name}: {opt.type} = {opt.default}")

# Filter by subsection
for opt in hyprland_schema.get_subsection("decoration", "blur"):
    print(f"{opt.name}: {opt.type} = {opt.default}")

# Iterate all options
for opt in hyprland_schema.OPTIONS:
    print(f"{opt.key}: {opt.type}")

# Export as JSON
json_str = hyprland_schema.get_json()

Loading older Hyprland versions

import hyprland_schema

# List all bundled versions (newest first)
print(hyprland_schema.available_versions())

# Load schema for a specific version
schema = hyprland_schema.load("v0.54.2")
print(schema.version, len(schema.options))

# Schema objects have the same filtering API
for opt in schema.get_section("general"):
    print(f"{opt.name}: {opt.type} = {opt.default}")

# Lookup on a Schema
border = schema.options_by_key["general:border_size"]

The version is accepted with or without the v prefix, so the bare number hyprctl reports can be passed straight through; schema.version reports the tag spelling either way.

Resolution order for load():

  1. Latest bundled version — instant (pre-parsed).
  2. Older bundled version — reconstructed via reverse migrations.
  3. Disk cache at ~/.cache/hyprland-schema/ — no network needed.
  4. GitHub fetch — downloads ConfigValues.cpp (or, for older tags, ConfigDescriptions.hpp) and parses it.

API

Symbol Type / Signature Description
HYPRLAND_VERSION str Hyprland tag the schema was built from
OPTIONS tuple[HyprOption, ...] All configuration options
OPTIONS_BY_KEY dict[str, HyprOption] Lookup by dotted key
get_section(s) (str) -> list[HyprOption] Options in a top-level section
get_subsection(s, sub) (str, str) -> list[HyprOption] Options in a nested subsection
get_json() (*, indent=2) -> str Full schema as a JSON string
load(version) (str) -> Schema Load schema for a specific Hyprland version
available_versions() () -> list[str] All bundled versions, newest first
MigrationError Exception Raised when a version migration fails

Schema

Schema is a frozen dataclass returned by load(). It holds options for a specific Hyprland version.

Attribute / Method Type / Signature Description
version str Hyprland version tag
options tuple[HyprOption, ...] All options for this version
options_by_key dict[str, HyprOption] Lookup by dotted key
get_section(s) (str) -> list[HyprOption] Options in a top-level section
get_subsection(s, sub) (str, str) -> list[HyprOption] Options in a nested subsection
get_json() (*, indent=2) -> str Schema as a JSON string

HyprOption fields

Field Type Description
key str "general:border_size"
section tuple[str, ...] ("general",)
name str "border_size"
description str Human-readable text
type str bool, int, float, string, color, gradient, vec2, choice, cssgap, font_weight
default Any Default value
min int | float | None For int/float types
max int | float | None For int/float types
enum_values tuple[str, ...] | None For choice type
default_str str | None Human-readable default for choice type
default_min tuple[float, ...] | None For vec2 type
default_max tuple[float, ...] | None For vec2 type

Requirements

  • Python >= 3.12

License

MIT

Metadata

Release files for hyprland-schema 0.7.1

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

Source distribution (sdist)

Source distribution for hyprland-schema 0.7.1
File Size Uploaded
hyprland_schema-0.7.1.tar.gz 47.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hyprland-schema 0.7.1
File Interpreter ABI Platform
hyprland_schema-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 101.2 kB

Release files / hyprland_schema-0.7.1.tar.gz

Download URL hyprland_schema-0.7.1.tar.gz
Size 47.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e73d4a19aece1df602c52b2985df35f6c8bc584b0fa7058ea56e1aab9fc01233
BLAKE2b-256 checksum
How to use checksums
af4811d41c3740072c309fd1eb61dfbfe4f9897a2b1124c1f10cb17a18dc8172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 31, 2026.

Transparency log

Release files / hyprland_schema-0.7.1-py3-none-any.whl

Download URL hyprland_schema-0.7.1-py3-none-any.whl
Size 53.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97637f24ac593232e388f99b079c4166cc8e321775e9097470f3b467cda551dc
BLAKE2b-256 checksum
How to use checksums
0f2466d5aad64573e38a5ec31820f3a920ff6a79364a329dba7f3e708bced536
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

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