NiceCRUD
NiceCRUD is a CRUD (Create, Read, Update, Delete) interface built with python. The library integrates with pydantic models and NiceGUI to handle data manipulation with a browser interface.
Features
- Automatically generate CRUD interfaces from pydantic models.
- Field options, ranges, constraints, descriptions etc. are directly taken from your pydantic model
- Integrated validation and error handling with pydantic.
- Support for nested models and selection options.
- Inject your own (database?) update methods
- Minimal configuration required with sensible defaults.
Screenshots
Taken from the input_choices example:
Installation
To install NiceCRUD, use pip:
pip install niceguicrud
Quick Start
Here is a very basic example:
from nicegui import ui
from pydantic import BaseModel, Field
from niceguicrud import NiceCRUD
class MyModel(BaseModel, title="User"):
id: int
name: str = Field(title="Name")
age: int = Field(gt=0, title="Age")
instance1 = MyModel(id=1, name="Alice", age=30)
instance2 = MyModel(id=2, name="Bob", age=25)
crud_app = NiceCRUD(basemodels=[instance1, instance2], id_field="id", heading="User Management")
ui.run()
Find more in the examples folder.
| Example Name | Description |
|---|---|
| minimal | The above minimal example |
| validation | Example showcasing how pydantic validation features are used in the GUI |
| submodel | Demonstrates usage of a pydantic submodel that can also be used in the GUI. |
| input_choices | Shows the different input choices. |
| database | Shows how to customize the update, create and delete operations |
Contributing
Contributions are welcome!
Publishing new versions
Make sure that the environment variable UV_PUBLISH_TOKEN is set to a pypi secret token.
uv build
uv publish
License
This project is licensed under the MIT License. See the LICENSE.
Metadata
Release files for niceguicrud 0.1.13
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 | |
|---|---|---|---|---|
| niceguicrud-0.1.13.tar.gz | 285.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| niceguicrud-0.1.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 313.1 kB
Release files / niceguicrud-0.1.13.tar.gz
| Download URL | niceguicrud-0.1.13.tar.gz |
|---|---|
| Size | 285.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4852d844ad3dc628538f401bf1fe1b1bab81e20c2a0bdd1a42b532cfbec60ddf
|
|
BLAKE2b-256 checksum How to use checksums |
ead05220a6835980d5a5eb252e9264a1493c269515c8d8c9754e8188facf96d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / niceguicrud-0.1.13-py3-none-any.whl
| Download URL | niceguicrud-0.1.13-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8e6fdf78ab064797a38f27e8f3ce8af3d6dc8ea7497123475f2d7e3aa1f7b9a
|
|
BLAKE2b-256 checksum How to use checksums |
dddbd9ed1271655541c527db8bda04a43f136e15d169c06e156e9d55ab62a914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for niceguicrud 0.1.13
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.