Skip to main content

📂 filemanager

Une bibliothèque Python ultra-légère et robuste pour gérer simplement vos fichiers JSON sans vous soucier des fichiers manquants ou corrompus.

License: MIT Python Version Site Web

✨ Fonctionnalités

  • Auto-Réparation : Si un fichier JSON est corrompu ou mal formé, la bibliothèque le détecte et le réinitialise proprement pour éviter le crash de votre application.
  • Sécurité : Création automatique des fichiers s'ils n'existent pas lors d'une tentative de lecture ou d'écriture.
  • Simplicité : Enregistrez une clé et une valeur en une seule ligne de code sans charger tout le fichier manuellement.

🚀 Installation

Installez directement depuis PyPI:

pip install filemanager

🛠️ Utilisation

from filemanager import load_data, save_data, save_key, exist, create_json
filename = "config.json"

# 1. Vérifier si le fichier existe
print(exist(filename)) # Retourne False ou True

# 2. Sauvegarder des données complètes (Crée le fichier automatiquement s'il n'existe pas)
data_utilisateurs = {
    "pseudo": "Valk",
    "premium": True
}
save_data(filename, data_utilisateurs)

# 3. Ajouter ou modifier une clé spécifique facilement
save_key(filename, "version", "1.0.2")

# 4. Charger les données du fichier
config = load_data(filename)
print(config)
# Résultat : {'pseudo': 'Valk', 'premium': True, 'version': '1.0.2'}

# 5. Créer un json avec un dictionnaire initial ou non
create_json(filename)
# Créer un JSON avec un dictionnaire vide: {}

create_json(filename, {"valeur_de_base": True})
# Créer un JSON avec un dictionnaire: {"valeur_de_base": True}

Metadata

Release files for valk-filemanager 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for valk-filemanager 0.3.2
File Size Uploaded Provenance Actions
valk_filemanager-0.3.2.tar.gz 4.1 kB With provenance Details for valk_filemanager-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for valk-filemanager 0.3.2
File Interpreter ABI Platform Actions
valk_filemanager-0.3.2-py3-none-any.whl Python 3 none any Details for valk_filemanager-0.3.2-py3-none-any.whl

Total release size: 8.4 kB

Release files / valk_filemanager-0.3.2.tar.gz

Download URL valk_filemanager-0.3.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
13bd089f1901e6e91ae580e0ae99a0a82ea22eee1816f44309f7ba6f5b431258
BLAKE2b-256 checksum
How to use checksums
e75d4a7af286da05f7f67642a7960641e12b0023eecdd478c4518a2a3039dcbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

Release files / valk_filemanager-0.3.2-py3-none-any.whl

Download URL valk_filemanager-0.3.2-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
846605989763836181bea288e3c2308a1abf09a93460ed6424520e8b5526b38a
BLAKE2b-256 checksum
How to use checksums
29b7ccc4f7f72e59504d7e0caf753e4230cf506b82bf3e64c2318fbc75edb7c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

Security for valk-filemanager 0.3.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for valk_filemanager-0.3.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 24, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page