costapy/README.md

72 lines
1.8 KiB
Markdown
Raw Normal View History

2022-03-16 11:06:52 +07:00
# CostaPy
2022-03-16 10:48:48 +07:00
Python Web Framework. Build with CherryPy and Mako.
Forked from [Pytavia](https://github.com/sidonesia/pytavia). But now it have a huge difference in the structure.
2022-03-16 11:06:52 +07:00
2022-03-16 11:22:14 +07:00
## License
CostaPy
Copyright (C) 2022 Dita Aji Pratama
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
2022-03-16 11:06:52 +07:00
## Requirement & Installation
You need this libraries to use CostaPy:
2024-05-12 02:28:57 +07:00
- bottle
- gunicorn
2022-03-16 11:06:52 +07:00
- mako
You can install it with run this command
sh install.sh
2022-06-14 14:50:07 +07:00
Here is the completed command
sudo apt-get install -y python3-pip
2022-06-14 14:50:07 +07:00
pip install --upgrade pip
2024-05-12 02:28:57 +07:00
pip install bottle
pip install gunicorn
2022-06-14 14:50:07 +07:00
pip install mako
2022-03-16 11:06:52 +07:00
## Usage
Use this command to start the web service
2024-05-12 02:28:57 +07:00
python3 costa.py
2022-03-16 11:06:52 +07:00
You can use nohup too and running it in the background like this
2024-05-12 02:28:57 +07:00
nohup python3 costa.py &
2022-03-16 11:06:52 +07:00
## Configuration
### Global Variable (config/globalvar.py)
2024-05-12 02:28:57 +07:00
`globalvar.py` is the place for storing your Global Variable.
2022-03-16 11:06:52 +07:00
2024-05-12 02:28:57 +07:00
`baseurl` </br>
2022-03-16 11:12:43 +07:00
Is the variable for your base URL (without `/` in the end).
2022-03-16 11:06:52 +07:00
2024-05-12 02:28:57 +07:00
`title` </br>
2022-03-16 11:12:43 +07:00
Is the variable for your web title.
2022-03-16 11:06:52 +07:00
### Directory (config/directory.py)
2024-05-12 02:28:57 +07:00
`directory.py` is the place for storing your path. It is useful to calling the path more efficiently.
2022-03-16 11:06:52 +07:00
## Handling the modules
Handling the module is in `handler.py`.