Skip to main content

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

Project description

deploy_pkg

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

deploy_pkg 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-pkg

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-pkg            # ou : python -m deploy_pkg

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-pkg
# => crée pyproject, README, etc. puis publie automatiquement

Publier un projet déjà existant

cd awesome
git status         # doit être propre
deploy-pkg
# => 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.9.tar.gz (5.8 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.9-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deploy_pkg-0.0.9.tar.gz
  • Upload date:
  • Size: 5.8 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.9.tar.gz
Algorithm Hash digest
SHA256 265ed3a180a083641b5b25ec3060e3fe885f0d5454d9190762ae56300f6762b6
MD5 738bb78997868dc21ca0c7d29ab2b40b
BLAKE2b-256 c2ee0978c0dad0fe94dc2d359aaa5115b6bd13b00cdb8f86af4a569161fe818b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploy_pkg-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6b2236dd067ce89845e1750bfa0fb3c0e7b60cd7e657bf1caf8d6f68b40e76aa
MD5 60dce374d1c793eb5c2c77ea938349c4
BLAKE2b-256 f1131268597662121cca6bd60401ea415485c3092c4569f633e0771572bdeb61

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