authsquare/app
2024-06-17 17:48:14 +07:00
..
.beaker/data Beaker session dir 2024-06-17 12:15:17 +07:00
config Environment variables 2024-06-17 17:48:14 +07:00
core For templating. Including: launcher and directory config 2024-06-17 12:34:19 +07:00
modules Register done 2024-06-17 17:33:29 +07:00
pages Register done 2024-06-17 17:33:29 +07:00
scripts Add scripts 2024-06-17 17:31:07 +07:00
static Register done 2024-06-17 17:33:29 +07:00
templates Add Postcard template 2024-06-17 17:30:24 +07:00
.gitignore Update .gitignore 2024-06-17 17:38:18 +07:00
costa.py For templating. Including: launcher and directory config 2024-06-17 12:34:19 +07:00
handler.py Register done 2024-06-17 17:33:29 +07:00
install.sh CostaPy dependencies 2024-06-17 12:22:18 +07:00
LICENSE Update LICENSE and README.md (CostaPy) 2024-06-17 12:18:48 +07:00
README.md Update LICENSE and README.md (CostaPy) 2024-06-17 12:18:48 +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.