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.8.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.8-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deploy_pkg-0.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 10b8baf9d283683477c455aecabc601da51211f5edfa1c34e16f304493fc5445
MD5 0b3457610efb82896867e0c4bc6a31a4
BLAKE2b-256 b623792a70d958fbc61590b2608c983bfeaa9d934d76b36651fe9ef6db67967e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deploy_pkg-0.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a57902b996c48f7f26aa587d3d436632e0972d1bbf88dab8102c1d8d91f6eba1
MD5 cac292d6ad9604542af1e7f9903770ea
BLAKE2b-256 5a318d5bf38edc3e216c58cc854ecbc57e95d908b12b1d3c30cd7061141db051

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