Skip to main content

No project description provided

Project description

pyxdownload

pyxdownload est un module Python puissant et léger qui facilite le téléchargement de fichiers (légers ou volumineux) via une communication client-serveur en sockets.

Il est idéal pour les développeurs qui souhaitent intégrer rapidement une fonctionnalité de transfert de fichiers fiable dans leurs projets réseau.


✨ Fonctionnalités

  • ✅ Transfert de fichiers en toute simplicité via sockets
  • 📦 Prise en charge des petits comme des très gros fichiers
  • 📊 Affichage d'une barre de progression élégante avec tqdm
  • 🔐 Utilisation de struct pour une transmission sécurisée de la taille des fichiers
  • 🏁 Détection de fin de transfert avec un identifiant personnalisé (<EOF>)

🔧 Fonctions principales

ReadFile()

  • Vérifie si le fichier demandé existe localement.
  • Envoie un signal de disponibilité (yes ou no) au serveur.
  • Transmet la taille du fichier via struct.pack.
  • Envoie les données du fichier par blocs de 1024 octets.
  • Termine la transmission avec un marqueur spécial <EOF>.

WriteFile()

  • Attend la confirmation de disponibilité du fichier côté client.
  • Reçoit la taille du fichier avec struct.unpack.
  • Lit les blocs de données et les écrit dans un fichier local.
  • Affiche une barre de progression tqdm pendant le téléchargement.
  • S’arrête dès que le marqueur <EOF> est détecté.

💻 Exemple d'utilisation

📦 Installation

pip install pyxdownload



🖥️ Serveur (server.py)

from pyxdownload import WriteFile

def recevoir_fichier(nom_fichier, socket_client):
    WriteFile(nom_fichier, socket_client)

🖥️ Client (client.py)

from pyxdownload import ReadFile

def envoyer_fichier(nom_fichier, socket_serveur):
    ReadFile(nom_fichier, socket_serveur)


👤 Auteur

    Nom : luffpyx

    GitHub : https://github.com/luffpyx/download_file.git

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

pyxdownload-0.2.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

pyxdownload-0.2.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file pyxdownload-0.2.0.tar.gz.

File metadata

  • Download URL: pyxdownload-0.2.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for pyxdownload-0.2.0.tar.gz
Algorithm Hash digest
SHA256 67876ef4b5dce24d2f964cf1f065cd1628d4dbcbe76dd9b6c9e8b3f448d3ab47
MD5 3b48905f2040469e4d7cdf317aff2e62
BLAKE2b-256 9c5d5c27dc5440ea4259564ffe658f25777a02fc39d4ac41ad89c77acb963364

See more details on using hashes here.

File details

Details for the file pyxdownload-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyxdownload-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for pyxdownload-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa9b99fd8fc2e3921e0876a37cecc5fc3c4620c4a38e0fcc2a4bfe22d0226784
MD5 999099a53f6a244684ddcacd3de3ac9e
BLAKE2b-256 1f9ddde9610a182df63236b8de7974bae2f5b96494395a03e66be9a0ab7a89be

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