Python WSGI Web Framework. https://costapy.ditaajipratama.net/
Go to file
2024-08-09 15:38:02 +07:00
.beaker/data Implement session with beaker 2024-06-13 12:43:46 +07:00
config beaker data directory should be hidden 2024-06-30 14:32:42 +07:00
core Fixing wrong routes in core staticdir 2024-07-31 10:33:24 +07:00
modules/public change the default template 2024-06-05 23:27:52 +07:00
pages/public change the default template 2024-06-05 23:27:52 +07:00
static/css a template staticdir 2023-12-15 16:58:00 +07:00
.gitignore Update .gitignore 2024-07-31 10:30:51 +07:00
costa.py Implement session with beaker 2024-06-13 12:43:46 +07:00
handler.py change the default template 2024-06-05 23:27:52 +07:00
install.sh Implement session with beaker 2024-06-13 12:43:46 +07:00
LICENSE Create LICENSE 2022-03-16 11:15:58 +07:00
README.md Update README.md 2024-06-13 13:01:17 +07:00

CostaPy

Python Web Framework. Build with Bottle and Mako.

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/.

Requirement & Installation

Clone the repository

Clone the repository with --recursive when cloning the repo.

git clone https://gitea.ditaajipratama.net/aji/costapy.git --recursive

Note that if you forgot the --recursive flag you can do:

git submodule update --init

Note that when submodules have other submodules you need recursive option.

git submodule update --init --recursive

Dependencies

You need this libraries to use CostaPy:

  • bottle
  • gunicorn
  • beaker
  • mako

You can install it with run this command

sh install.sh

Here is the completed command

sudo apt-get install -y python3-pip
pip install --upgrade pip
pip install bottle
pip install gunicorn
pip install beaker
pip install mako

Usage

Use this command to start the web service

python3 costa.py

You can use nohup too and running it in the background like this

nohup python3 costa.py &

Configuration

Global Variable (config/globalvar.py)

globalvar.py is the place for storing your Global Variable.

baseurl
Is the variable for your base URL (without / in the end).

title
Is the variable for your web title.

Directory (config/directory.py)

directory.py is the place for storing your path. It is useful to calling the path more efficiently.

Handling the modules

Handling the module is in handler.py.