# irails
A mvc framework used FastApi
Simple and elegant use of FastApi in MVC mode
[Online Docs](https://irails.2rails.cn/)
# Welcome to IRAILS
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.
## Installation
* `pip install irails` - install irails
## Commands
* `irails 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>](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**).
## Project layout
```
| 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)
```
## Extras commands
* `irails i18n gettext` --generate i18n in irails app dir
* `irails shell` --run python interpreter with buildin support contexts
* `irails test` --run project tests
* `irails migrate` --run database migrations
Raw data
{
"_id": null,
"home_page": "https://github.com/smjkzsl/irails",
"name": "irails",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "web framework,mvc framework,fastapi framework",
"author": "Bruce chou",
"author_email": "smjkzsl@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/24/b0/6f552cf4880a5b14b78aeada7b2ccdd45949cba9f7e573a7eb7ea7cf8085/irails-1.6.4.tar.gz",
"platform": null,
"description": "# irails\r\nA mvc framework used FastApi\r\nSimple and elegant use of FastApi in MVC mode\r\n\r\n[Online Docs](https://irails.2rails.cn/) \r\n# Welcome to IRAILS\r\nIRAILS 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.\r\nThe 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.\r\n \r\n\r\n## Installation \r\n\r\n* `pip install irails` - install irails\r\n\r\n## Commands\r\n\r\n* `irails project [project-name(dir-name)]` - Create a new irails project.\r\n* `irails app [app-name(choose or input apps dir)]` - Example: `irails app admissions` Create a new irails app.\r\n* `irails run [--host host] [--port port]` - Run project visit on [http://127.0.0.1:8000>](http://127.0.0.1:8000). \r\n* `irails controller [actions...]` - generate a controller with given actions(if no given,defalut is **index**). \r\n* `irails model [columns...]` - generate a model(and model's service and tests) with given columns(if no given,defalut is **id**). \r\n \r\n\r\n## Project layout\r\n```\r\n \r\n | main.py\r\n +---apps ## Apps container (A project can have multiple containers)\r\n | +---admissions ## App dir (An application container can have multiple applications)\r\n | | | __init__.py \r\n | | +---controllers ## Controller files\r\n | | | | home_controller.py ## Controller class file,it's look like `class HomeController`\r\n | | | | __init__.py\r\n | | +---locales ## I18n locales dir,use command `apps/app:$ iralis i18n gettext` will auto generate items\r\n | | +---models ## Database models files(if you use some database support)\r\n | | | __init__.py\r\n | | +---services ## Module for business logic processing\r\n | | +---tests ## Unit testting\r\n | | +---views ## Static view files (use `Jinja2` Template)\r\n | | | | layout.html\r\n | | | |\r\n | | | +---home ## The controller action's static file(name is same to the controller's class name)\r\n | | | | home.css \r\n | | | | home.html ## Static file corresponding to action(name is same to the controller's method name)\r\n | | |---manifest.yaml ## The app manifest for each app\r\n +---configs ## Project configure dir\r\n | alembic.ini ## Alembic configure file (Generally, there is no need to change, used the database migration)\r\n | casbin-adapter.csv ## Casbin auth module config adapter file()\r\n | casbin-model.conf ## Casbin auth config model\r\n | database.yaml ## Configure for database support\r\n | general.yaml ## General configures\r\n | session.yaml ## Session configures\r\n |\r\n +---data\r\n | +---alembic\r\n | | \\---versions\r\n | \\---db\r\n |\r\n +---public ## Public dir (will mounted to the '/public' url)\r\n | | error_404.html ## Error page ...\r\n | | error_500.html\r\n |\r\n +---uploads ## Others dir(if your need or not)\r\n```\r\n## Extras commands\r\n* `irails i18n gettext` --generate i18n in irails app dir\r\n* `irails shell` --run python interpreter with buildin support contexts \r\n* `irails test` --run project tests \r\n* `irails migrate` --run database migrations\r\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Simple and elegant use of FastApi in MVC mode",
"version": "1.6.4",
"project_urls": {
"Homepage": "https://github.com/smjkzsl/irails"
},
"split_keywords": [
"web framework",
"mvc framework",
"fastapi framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a2b73514bc7210be269c29e82906e346fee19c209dc17feb3b99c973a3905177",
"md5": "64f1e3ba269e8eb3416eaf1dc1134213",
"sha256": "3e237fbe6d5d8e39f6a490ef629313aec48cca2d54b80ea7883dd28ff9048b67"
},
"downloads": -1,
"filename": "irails-1.6.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "64f1e3ba269e8eb3416eaf1dc1134213",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 1050316,
"upload_time": "2023-12-28T12:50:47",
"upload_time_iso_8601": "2023-12-28T12:50:47.977597Z",
"url": "https://files.pythonhosted.org/packages/a2/b7/3514bc7210be269c29e82906e346fee19c209dc17feb3b99c973a3905177/irails-1.6.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "24b06f552cf4880a5b14b78aeada7b2ccdd45949cba9f7e573a7eb7ea7cf8085",
"md5": "e2e5fd896e19916b04496a1aa6acda50",
"sha256": "82bb7b64f662464662300c70935ee61fd00e5fde8f6fc8111cf41c27892e1b2b"
},
"downloads": -1,
"filename": "irails-1.6.4.tar.gz",
"has_sig": false,
"md5_digest": "e2e5fd896e19916b04496a1aa6acda50",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1022024,
"upload_time": "2023-12-28T12:50:50",
"upload_time_iso_8601": "2023-12-28T12:50:50.445350Z",
"url": "https://files.pythonhosted.org/packages/24/b0/6f552cf4880a5b14b78aeada7b2ccdd45949cba9f7e573a7eb7ea7cf8085/irails-1.6.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-28 12:50:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "smjkzsl",
"github_project": "irails",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "irails"
}