Skip to main content

One-shot bootstrap & deploy script for Python packages (git+GitHub+PyPI).

Project description

deploy_me

🚀 Le couteau suisse « one-shot » pour publier un paquet Python en un seul appel.

deploy_me automatise tout le pipeline :
– bootstrap de projet (pyproject/README/licence/git…)
– création de dépôt GitHub + push + tag
– build Python & éventuel frontend npm
– installation locale (editable)
– publication PyPI via Twine

Aucune interaction : lance et profite !


Installation

pip install deploy_me

ou en local :

git clone https://github.com/<toi>/deploy_me.git
cd deploy_me
pip install -e .

Pré-requis

Outil Rôle
git versionnage + push GitHub
Python ≥ 3.8 exécution du script
GITHUB_TOKEN droits repo + user:email
(optionnel) npm build du dossier frontend/ (si présent)

Crée un fichier .env :

GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
# PKG_NAME=override_nom_paquet   # (facultatif)

Usage

Dans le dossier de ton projet (vide ou existant) :

deploy-me            # ou : python -m deploy_me

Le script :

  1. installe les dépendances manquantes (build, twine, …)
  2. crée les fichiers de base s’ils n’existent pas
  3. incrémente le patch de version (0.0.X → 0.0.X+1)
  4. construit le paquet (python -m build)
  5. pip install -U -e .
  6. init git / commit / tag / push
  7. upload dist/* sur PyPI

Boom ! Ton paquet est en ligne et déjà installé à jour sur ta machine.


Exemples

Publier un tout nouveau projet

mkdir awesome
cd awesome
deploy-me
# => crée pyproject, README, etc. puis publie automatiquement

Publier un projet déjà existant

cd awesome
git status         # doit être propre
deploy-me
# => bump version, build, push, upload

Dépendances runtime

  • requests
  • toml
  • python-dotenv

Les outils « build » (build, twine) sont installés à la volée si absents.


Pourquoi pas un simple Makefile ?

Parce que :

  • tu oublies toujours une étape (« Twine ? tag git ? bump ?… »)
  • ça détecte et installe ce qu’il manque (git, deps Python, npm)
  • aucun copier-coller : un fichier, une commande, fini.

Contribuer

Les MR / PR sont les bienvenues.
Avant de pousser :

python -m pip install -e ".[dev]"
pytest

Licence

MIT – fais-en bon usage, améliore-le, partage-le !

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deploy_pkg-0.0.7.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deploy_pkg-0.0.7-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file deploy_pkg-0.0.7.tar.gz.

File metadata

  • Download URL: deploy_pkg-0.0.7.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for deploy_pkg-0.0.7.tar.gz
Algorithm Hash digest
SHA256 8cd18b2c2457bdecb0db818f25800ced322f20605682dd3540cb895513cbef57
MD5 8c0218aa4d83a68b196368c9191004f9
BLAKE2b-256 caa02bd69bfa8c98d0622634710f51070576a56dcd3f3e1432d1daeec73b885c

See more details on using hashes here.

File details

Details for the file deploy_pkg-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: deploy_pkg-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for deploy_pkg-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a9103d003eb7f303eaba7949d7bba89664b98d84f055a9e1ad1be99d2275201c
MD5 f085b602bf0a358a289a6b3b0f79521b
BLAKE2b-256 e73b0946f0c3b4d3fd62a0c9f4a64af9b803a5e7d45c0fb48c0945a14b74341e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page