Ashrio
A frontend web-framework made in python, for python, with python in mind constantly
Ashrio is the thing I've been looking for but could never find: a frontend-web framework in python that is easy to use and even easier to extend*. Right now it is JUST starting out, there are a grand total of 4 components, 5 if you count the grid system. It is simple and probably not useable at the moment, but hopefully it will be.
The Idea + How to customize
I wanted something I could EXTEND easily. To extend this, you only really need your class to be a subclass of pydantic BaseModel, to have a filepath parameter, and to define a get_html method and a recommended write_to_file method (which is basically 3 lines of code once youve defined the get_html method haha).
The get_html method should do the following:
- take the "props" (pydantic items) and integrate them into the styles/content/whatever they do
- output html with styles, js, or whatever you want i. the only rule about the html is that it needs a style_extra parameter with a default set to "" that plugs into (usually) the top level div/whatever. This is how the grid system works, so it is a must
there is a write_to_file method defined in utils that handles the complex stuff, so really you just need to get the code from get_html and then use the write_to_file method.
If you have any questions, PLEASE ask.
Plans/Future
- Move to react (not sure if this is even worth it, might make it harder to use..
- Add more styling options
- add a ton more components
- add an event handling system
- migrate to tailwind
- use Alpine for reactivity and better functionality (WIP)
Release files for ashrio 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ashrio-0.1.0.tar.gz | 10.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ashrio-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.2 kB
Release files / ashrio-0.1.0.tar.gz
| Download URL | ashrio-0.1.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96b6b6c180deb1b9f633e9297c7d00edf516e842ba876e7a5ad6819a049b6509
|
|
BLAKE2b-256 checksum How to use checksums |
5ad6b4005d868025a9fe06adfc015acedeaa9fdad362a8c383f49a71a0343275
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0
|
Release files / ashrio-0.1.0-py3-none-any.whl
| Download URL | ashrio-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ea42ccfebdb609d2c5aafb8f2bae2aed27d94991aef3056cf23447bc8f02674
|
|
BLAKE2b-256 checksum How to use checksums |
f3ba2d4e750e12619f4e271ee73eba16a05ac25f3db08300f1c7a848c7622e95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0
|