Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
A mvc framework used FastApi Simple and elegant use of FastApi in MVC mode
IRAILS is not just an ordinary imitation of Ruby on rails, but based on the characteristics of the Python language itself, combined with rich Python class libraries, it refuses to create wheels repeatedly, and can achieve web development with minimal code and configuration, making Python web development fast and powerful, and can be easily deployed on various platforms. The design concept of IRails refers to some RORs, but it has its own soul. It does not pursue the ultimate configuration and development, but rather appropriate configuration and development. Currently, it is in a preview version and will continue to improve in the future.
pip install irails
- install irailsirails project [project-name(dir-name)]
- Create a new irails project.irails app [app-name(choose or input apps dir)]
- Example: irails app admissions
Create a new irails app.irails run [--host host] [--port port]
- Run project visit on http://127.0.0.1:8000>.irails controller [actions...]
- generate a controller with given actions(if no given,defalut is index).irails model [columns...]
- generate a model(and model's service and tests) with given columns(if no given,defalut is id).
| main.py
+---apps ## Apps container (A project can have multiple containers)
| +---admissions ## App dir (An application container can have multiple applications)
| | | __init__.py
| | +---controllers ## Controller files
| | | | home_controller.py ## Controller class file,it's look like `class HomeController`
| | | | __init__.py
| | +---locales ## I18n locales dir,use command `apps/app:$ iralis i18n gettext` will auto generate items
| | +---models ## Database models files(if you use some database support)
| | | __init__.py
| | +---services ## Module for business logic processing
| | +---tests ## Unit testting
| | +---views ## Static view files (use `Jinja2` Template)
| | | | layout.html
| | | |
| | | +---home ## The controller action's static file(name is same to the controller's class name)
| | | | home.css
| | | | home.html ## Static file corresponding to action(name is same to the controller's method name)
| | |---manifest.yaml ## The app manifest for each app
+---configs ## Project configure dir
| alembic.ini ## Alembic configure file (Generally, there is no need to change, used the database migration)
| casbin-adapter.csv ## Casbin auth module config adapter file()
| casbin-model.conf ## Casbin auth config model
| database.yaml ## Configure for database support
| general.yaml ## General configures
| session.yaml ## Session configures
|
+---data
| +---alembic
| | \---versions
| \---db
|
+---public ## Public dir (will mounted to the '/public' url)
| | error_404.html ## Error page ...
| | error_500.html
|
+---uploads ## Others dir(if your need or not)
irails i18n gettext
--generate i18n in irails app dirirails shell
--run python interpreter with buildin support contextsirails test
--run project testsirails migrate
--run database migrationsFAQs
Simple and elegant use of FastApi in MVC mode
We found that irails demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.