costapy.ditaajipratama.net/pages/getting-starter.md

50 lines
1.6 KiB
Markdown
Raw Normal View History

2023-08-13 21:55:18 +07:00
# Getting Starter
## Requirement
2026-01-04 22:17:43 +07:00
You need a [git](pages/requirement/git.md), `python`, [pip](pages/requirement/pip.md), and [venv](pages/requirement/venv.md) before using CostaPy.
2023-08-13 21:55:18 +07:00
2024-08-09 16:04:05 +07:00
Install them using the following commands on your `Debian` or `Ubuntu` system.
2023-08-13 21:55:18 +07:00
2024-08-09 16:04:05 +07:00
```bash
sudo apt update
sudo apt install git python3 python3-venv python3-pip
```
or you can use the following command to install similar packages using `brew`, the package manager for `macOS`:
2023-08-13 21:55:18 +07:00
2024-08-09 16:04:05 +07:00
```bash
brew install git python3
```
2026-01-06 23:18:23 +07:00
Installs Python 3 with `brew`, which includes `python3`, [pip3](pages/requirement/pip.md), and the [venv](pages/requirement/venv.md) module. If you don't have Homebrew installed on your `macOS`, you can install it first.
2024-08-09 16:04:05 +07:00
2026-01-06 23:18:23 +07:00
or go to the [git downloads page](https://git-scm.com/downloads) and a [Python downloads page](https://www.python.org/downloads/) and download the latest version of [Git](pages/requirement/git.md) and Python for `Windows`.
2023-08-13 21:55:18 +07:00
## Installation
2026-01-06 23:18:23 +07:00
Download from [git](pages/requirement/git.md) repository
2024-08-09 16:04:05 +07:00
```bash
git clone https://gitea.ditaajipratama.net/aji/costapy.git
```
2023-08-13 21:55:18 +07:00
2026-01-06 23:18:23 +07:00
Go to the directory and [pip](pages/requirement/pip.md) install with this command:
2023-08-13 21:55:18 +07:00
2024-08-09 16:04:05 +07:00
```bash
cd costapy
2026-01-06 23:18:23 +07:00
python3 -m venv .venv
.venv/bin/pip3 install --upgrade pip
.venv/bin/pip3 install -r requirements.txt
2024-08-09 16:04:05 +07:00
```
2023-08-13 21:55:18 +07:00
## Usage
2024-08-09 16:04:05 +07:00
Use this command below to start the web service and it will run on port `11000` by default
```bash
.venv/bin/python3 costa.py costapy-welcome
```
Here, `costapy-welcome` is the label of your service. You can replace it with any name you prefer.
2026-01-04 22:18:23 +07:00
---
[`Back to Homepage`](/) [`Learn the structure`](pages/structure)