Nexom
Lightweight Python Web Framework (WSGI)
Nexomは短いコードで最低限動作し、シンプルで理解のしやすい設計・構造を目指しています。 また細かい仕様も変更でき、多様な処理に対応します。
主な機能セット
- WSGIベースの軽量Webフレームワーク
- ルーティング(GET/POST、動的パス引数)
- 静的ファイル配信
- Request/ResponseのシンプルAPI(HTML/JSON/Redirect/エラーページ)
- テンプレート(ObjectHTML: extends/import/slot)
- ビルドイン標準認証サーバー&クライアント(AuthService/AuthClient)
- Cookie管理
- ミドルウェア対応
- プロジェクト生成(buildTools)
- マルチパートアップロードと並列ストレージ基盤(ParallelStorage/MultiPartUploader)
はじめる
最初のサーバーを起動するには、3つの手順が必要です。
- プロジェクトディレクトリを作成
- nexomをpipでインストール、プロジェクトのビルド
- 起動
1.プロジェクトディレクトリの作成
準備
用意していない場合はディレクトリを作成し、仮想環境も準備してください
mkdir banana_project
cd banana_project
python -m venv venv
source venv/bin/activate
2. pipでインストール、サーバーのビルド
インストール
nexomをインストールします。
pip install
プロジェクトのビルド
プロジェクトディレクトリ上で、以下のコマンドを実行してください
もしNginxもしくはApacheを使用する場合 --gateway オプションにどちらか入力してください
$ python -m nexom start-project # --gateway nginx or apache
以下の構成でプロジェクトが生成されます。
banana_project/
├─ app/
│ ├─ pages/
│ │ ├─ __init__.py
│ │ ├─ _templates.py
│ │ └─ * pages *
│ ├─ static/
│ │ └─ * static items *
│ ├─ templates/
│ │ └─ * html files *
│ ├─ __init__.py
│ ├─ config.py
│ ├─ gunicorn.conf.py
│ ├─ router.py
│ └─ wsgi.py
├─ auth/
│ ├─ __init__.py
│ ├─ config.py
│ ├─ gunicorn.conf.py
│ └─ wsgi.py
└─ data/
├─ log/
│ └─ * app logs *
├─ db/
│ └─ * app db *
└─ gateway/
├─ app.nginx.conf
└─ app.apache.conf
3.起動
以下のコマンドを起動します。
$ python -m nexom run
ブラウザからアクセスできるようになります。 デフォルトのポートは8080です。
ポートなどの設定は config.py から変更してください。
Nginx等使用して外部公開する
gatewayディレクトリにある設定を読み込んでください
http {
include /home/ubuntu/banana_project/gateway/*.conf;
}
Systemdに登録して自動起動する
Ubuntuの場合
/etc/systemd/systemに、banana_sample.serviceを作成します。banana_sample.serviceに以下を書き込みます。(これは一例です。環境に合わせて設定してください。)
サーバーのディレクトリが /home/ubuntu/banana_project にある場合
[Unit]
Description=Nexom Web Freamework
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/home/ubuntu/banana_project
Environment="PYTHONPATH=/home/ubuntu/banana_project"
ExecStart=/home/ubuntu/banana_project/venv/bin/gunicorn sample.wsgi:app --config sample/gunicorn.conf.py
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
以下のコマンドを実行します
sudo systemd daemon-reload
sudo systemd enable banana_sample
sudo systemd start banana_sample
テンプレートユニットを活用して複数のアプリを効率的に管理
テンプレートユニットを活用し .service ファイルを一枚にまとめられます。
/etc/systemd/system/banana-project@.service
[Unit]
Description=Nexom Web Server (%i)
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/home/ubuntu/banana_project
Environment="PYTHONPATH=/home/ubuntu/banana_project"
ExecStart=/home/ubuntu/banana_project/venv/bin/gunicorn %iwsgi:app --config %i/gunicorn.conf.py
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
sudo systemd daemon-reload
sudo systemd enable banana-project@banana1
sudo systemd enable banana-project@banana2
sudo systemd enable banana-project@banana3
sudo systemd start banana-project@banana1
sudo systemd start banana-project@banana2
sudo systemd start banana-project@banana3
2026 1/28
Metadata
Release files for Nexom 1.1.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nexom-1.1.36.tar.gz | 73.5 kB | Without provenance | Details for nexom-1.1.36.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nexom-1.1.36-py3-none-any.whl | Python 3 | none | any | Details for nexom-1.1.36-py3-none-any.whl |
Total release size: 157.5 kB
Release files / nexom-1.1.36.tar.gz
| Download URL | nexom-1.1.36.tar.gz |
|---|---|
| Size | 73.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72ccb8d9f57a7809c310c11dce164cf8d47b3cdccc6ca2a3c8f197044cf4eba4
|
|
BLAKE2b-256 checksum How to use checksums |
00bc6185bb7b125aaf24d909d5d922e00bf6c49c99916a01d5e89371b31cf250
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / nexom-1.1.36-py3-none-any.whl
| Download URL | nexom-1.1.36-py3-none-any.whl |
|---|---|
| Size | 84.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
40fb55905d34b872269211c1a59155c7fa47cad9645a4aedd85ed481c59d3c2f
|
|
BLAKE2b-256 checksum How to use checksums |
3edd8af0e3fb7b2f7c51b6f2d727a848687bf5faaa9ea3983e8aae816ec19029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for Nexom 1.1.36
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.