Skip to content
GitHub

Public API

Documentation of the lexigram-admin public API surface, stability tiers, and deprecation policy.


Symbols in lexigram-admin are classified into one of three stability tiers. Each tier has different guarantees about backward compatibility.

Public API that is guaranteed to remain backward-compatible within the same major version. Breaking changes require a major version bump and are announced at least one minor version in advance.

Changes follow this process:

  1. Deprecation warning added (one minor version before removal).
  2. Breaking change scheduled for next major version.
  3. Migration guide published.

Public API that is still under active development. Breaking changes may occur at any time without prior deprecation. Experimental features are clearly marked in their docstrings and __init__.py exports.

  • Consumers should expect instability.
  • Feedback is encouraged to shape the final API.
  • Experimental features may be promoted to @stable or removed entirely.

Public API that is scheduled for removal. Deprecated symbols:

  • Emit a DeprecationWarning when accessed.
  • Document the replacement in their docstring.
  • Remain available for one minor version, then are removed at the next major version.

Symbols prefixed with a leading underscore (_) are private and not part of the public API. They may change or be removed without notice. Consumers must not import them.

Symbols in _*.py module files follow the same rule — the underscore module signals that all contents are internal.


SymbolTierNotes
Resource✅ stableBase class for admin resources
ResourceConfig✅ stableConfiguration dataclass for resources
TableConfiguration✅ stableTable display config
_validate_resource_name🔒 internalPrivate helper
SymbolTierNotes
SchemaField✅ stableAbstract base for all field types
TextField✅ stableText input field
EmailField✅ stableEmail field with validation
SelectField✅ stableDropdown / multi-select field
BooleanField✅ stableCheckbox / toggle field
DateField✅ stableDate picker field
DateTimeField✅ stableDateTime picker field
TimeField✅ stableTime picker field
NumberField✅ stableNumeric input field
TextareaField✅ stableMulti-line text field
FileField🧪 experimentalFile upload (depends on lexigram-media)
PasswordField✅ stableMasked password input
ColorField✅ stableColor picker field
TagsField🧪 experimentalTag input field
ImageField🧪 experimentalImage upload / display field
URLField✅ stableURL input field
PhoneField✅ stablePhone number field
HiddenField✅ stableHidden input field
PlaceholderField✅ stableRead-only display field
FieldValidator✅ stableValidator protocol
FieldError✅ stableField validation error type
SymbolTierNotes
IDataSource✅ stableProtocol for data access
DataSourceBase✅ stableAbstract base for data sources
SqlDataSource✅ stableSQL-backed data source
QueryResult✅ stablePaginated query result
QuerySpec✅ stableImmutable query specification
PagedResult✅ stableLightweight paginated result
FilterOperator✅ stableFilter operator enum
FilterCondition✅ stableFilter condition dataclass
SymbolTierNotes
Action✅ stableAbstract base for all actions
RowAction✅ stableAction on a single record
BulkAction✅ stableAction on multiple selected records
HeaderAction✅ stableAction with no record context
ActionGroup🧪 experimentalGrouped action menu
SymbolTierNotes
Cluster✅ stableNavigation group dataclass
SymbolTierNotes
AbstractRelationManager✅ stableABC for relation managers
RelationManager🧪 experimentalConcrete manager with inline CRUD
SymbolTierNotes
LayoutType✅ stableEnum: LIST, GRID, CALENDAR, KANBAN, etc.
LayoutConfig✅ stableLayout configuration dataclass
SymbolTierNotes
AbstractRule✅ stableBase class for validation rules
FieldError✅ stableValidation error type
IsValidAdminEmail✅ stableEmail validation rule
StrongPassword✅ stablePassword strength rule
IsValidUsername✅ stableUsername format rule
(other concrete rules)✅ stableSee validation/rules.py
SymbolTierNotes
Command✅ stableAction command dataclass
AdminProviderState🔒 internalProvider lifecycle state
SystemSetting✅ stableKey-value setting dataclass
AdminUser✅ stableRe-exported admin user type
SymbolTierNotes
(all middleware classes)🔒 internalRegistered by the framework, not for direct use
SymbolTierNotes
(all view classes)🔒 internalInternal views, not for direct consumption
SymbolTierNotes
Page✅ stableBase class for custom admin pages
SymbolTierNotes
AdminBundleProvider✅ stableProvider for registering admin in container
AdminModule✅ stableModule for configuring the admin panel

The canonical indicator of public API. Any symbol exported from a package’s __init__.py is part of the public API surface:

lexigram/admin/__init__.py
from lexigram.admin.resources.base import Resource

Types that are consumed by external packages (or user code) should be importable from the public path:

# ✅ Public — import from public path
from lexigram.admin.schema import TextField
# ❌ Internal — avoid deep paths
from lexigram.admin.schema.base import TextField

Public API docstrings include stability information:

def my_function():
"""Short description.
Stability: @stable
Args: ...
"""

Protocols decorated with @runtime_checkable (e.g., IDataSource) are deliberately public — they are designed for third-party implementations.


The lifecycle of a public API symbol:

Internal prototype
@experimental ──► released for feedback
│ │
│ (collect feedback,
│ refine API,
│ write tests,
│ document)
▼ │
@stable ◄─────────────────┘
  1. Tested — unit and integration tests cover the feature.
  2. Documented — docstrings follow Google style; usage guide exists.
  3. Reviewed — API surface reviewed for consistency with existing patterns.
  4. Backward-compatible — signature is unlikely to need breaking changes.
  5. At least one minor release — the feature has been @experimental for at least one minor version.

  1. Symbol is marked @deprecated in its docstring.
  2. Deprecation warning is emitted on access (via warnings.warn with DeprecationWarning).
  3. Replacement is documented in the docstring and the warning message.
  4. Migration guide is published.
EventVersion
Feature marked @experimentalX.Y.0
Feature marked @deprecatedX.Y+1.0
Feature removedX.Y+2.0 (next major)
import warnings
@deprecated("Use 'fields' list instead. See MIGRATION_FROM_TRIPLET.md")
class TextColumn:
def __init__(self, *args, **kwargs):
warnings.warn(
"TextColumn is deprecated. Use TextField with "
"visible_in_list=True instead.",
DeprecationWarning,
stacklevel=2,
)
  • Security fixes may remove unsafe API without deprecation.
  • Internal (_-prefixed) symbols may be removed at any time.
  • @experimental symbols may be removed with one minor version notice.

lexigram.admin
├── Action
├── RowAction
├── BulkAction
├── HeaderAction
├── ActionGroup
├── AbstractRule
├── Cluster
├── Page
├── Resource
├── SchemaField
├── TextField
├── EmailField
├── SelectField
├── BooleanField
├── DateField
├── DateTimeField
├── TimeField
├── NumberField
├── TextareaField
├── PasswordField
├── ColorField
├── TagsField
├── ImageField
├── FileField
├── URLField
├── PhoneField
├── HiddenField
├── PlaceholderField
├── FieldValidator
├── FieldError
├── IDataSource
├── DataSourceBase
├── SqlDataSource
├── QuerySpec
├── QueryResult
├── PagedResult
├── FilterOperator
├── AbstractRelationManager
├── RelationManager
├── LayoutType
├── LayoutConfig
├── AdminBundleProvider
├── AdminModule
├── Command
├── SystemSetting
└── AdminUser