Skip to main content

مدیریت امن تنظیمات برنامه با رمزنگاری AES-256

Project description

SecureSettings

مدیریت امن تنظیمات برنامه با رمزنگاری AES-256

PyPI version Python 3.7+ License: MIT


🌐 English | فارسی


English Documentation


📁 SecureSettings

SecureSettings is a Python library for securely storing and managing application settings with AES-256 encryption. It provides a simple way to store sensitive data like API tokens, passwords, and configuration values.

✨ Key Features

  • AES-256 Encryption: All data is encrypted with strong encryption
  • Multiple Data Types: Support for strings, numbers, lists, dictionaries, booleans
  • Auto-load: Settings are automatically loaded when initialized
  • Backup & Restore: Automatic backup and restore functionality
  • No External Dependencies: Uses only Python standard library and cryptography

📦 Installation

pip install securesettings-lab

🚀 Quick Start

from securesettings import Settings

Create settings with encryption

settings = Settings("my_app", password="your_secure_password")

Store sensitive data

settings.set("api_key", "sk-1234567890")
settings.set("debug", True)
settings.set("allowed_users", ["ali", "sara", "reza"])
settings.save()

Load in another session

settings2 = Settings("my_app", password="your_secure_password")
api_key = settings2.get("api_key")  # "sk-1234567890"
debug = settings2.get("debug", False)  # True
users = settings2.get("allowed_users", [])  # ["ali", "sara", "reza"]

📚 API Reference

Settings Class

Method Description
Settings(name, password, encrypt=True) Create a new settings instance
set(key, value) Store a value
get(key, default=None) Retrieve a value
delete(key) Delete a key
clear() Clear all settings
get_all() Get all settings as dict
has(key) Check if key exists
save() Save settings to file
backup() Create a backup
restore_backup() Restore from backup
reset() Reset to default

🛠️ Requirements

Python 3.7 or higher

cryptography>=3.0.0

📄 License

MIT

فارسی

📁 SecureSettings

SecureSettings یک کتابخانه پایتونی برای ذخیره‌سازی و مدیریت امن تنظیمات برنامه با رمزنگاری AES-256 است. این کتابخانه روشی ساده برای ذخیره اطلاعات حساس مانند توکن‌های API، رمزهای عبور و تنظیمات برنامه ارائه می‌دهد.

✨ ویژگی‌ها

-رمزنگاری AES-256: همه داده‌ها با رمزنگاری قوی محافظت می‌شوند

-پشتیبانی از انواع داده: رشته، عدد، لیست، دیکشنری، Boolean

-بارگذاری خودکار: تنظیمات در زمان مقداردهی اولیه بارگذاری می‌شوند

-پشتیبان و بازیابی: قابلیت پشتیبان‌گیری و بازیابی خودکار

-ادگی: استفاده آسان و بدون پیچیدگی

📦 نصب

pip install securesettings-lab

🚀 شروع سریع

from securesettings import Settings

ایجاد تنظیمات با رمزنگاری

settings = Settings("my_app", password="رمز_امن_شما")

ذخیره اطلاعات حساس

settings.set("api_key", "sk-1234567890")
settings.set("debug", True)
settings.set("allowed_users", ["علی", "سارا", "رضا"])
settings.save()

بارگذاری در جلسه دیگر

settings2 = Settings("my_app", password="رمز_امن_شما")
api_key = settings2.get("api_key")  # "sk-1234567890"
debug = settings2.get("debug", False)  # True
users = settings2.get("allowed_users", [])  # ["علی", "سارا", "رضا"]

📚 راهنمای توابع

کلاس Settings

توضیح تابع
Settings(name, password, encrypt=True) ایجاد یک نمونه جدید از تنظیمات
set(key, value) ذخیره یک مقدار
get(key, default=None) دریافت یک مقدار
delete(key) حذف یک کلید
clear() پاک کردن همه تنظیمات
get_all() دریافت همه تنظیمات به صورت دیکشنری
has(key) بررسی وجود کلید
save() ذخیره تنظیمات در فایل
backup() ایجاد پشتیبان
restore_backup() بازیابی از پشتیبان
reset() بازنشانی به حالت اولیه

🛠️ نیازمندی‌ها

Python 3.7 یا بالاتر

cryptography>=3.0.0

📄 مجوز

MIT

✨ اگر این کتابخانه برای شما مفید بود، به آن یک ⭐ در گیت‌هاب بدهید!

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

securesettings_lab-0.1.1.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

securesettings_lab-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file securesettings_lab-0.1.1.tar.gz.

File metadata

  • Download URL: securesettings_lab-0.1.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for securesettings_lab-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ceca8bc16b1c9e8b912ee1dcf78460550db8dc82d8045b10f15947f75de7aa14
MD5 7f487f79f897783c1ffa59664575f026
BLAKE2b-256 cf25fd6ccf899b73296acfab24d5875a757725715a37fae4a10096a686c2c326

See more details on using hashes here.

File details

Details for the file securesettings_lab-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for securesettings_lab-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4484d6395f870117cd88d8a47592befca8848874a74ac398ab88b25e3d151c0b
MD5 e8323bf7178bcf818da1cb64402fa4a1
BLAKE2b-256 a6f47084cff8f842e7e50e3e8b0ffa5d0a24b27779f823be9deba5fc89a555e3

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