Giter Site home page Giter Site logo

ashrio's Introduction

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)

ashrio's People

Contributors

ashercn97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.