A utility toolkit including logging, configuration, HuggingFace helpers and more.
Project description
OpenBuffet Toolkit
OpenBuffet ekosistemi için geliştirilmiş modüler bir Python araç kütüphanesidir. Bu toolkit; konfigürasyon yönetimi, loglama, zaman profilleme ve Hugging Face entegrasyonu gibi çok yönlü yardımcı bileşenler içerir.
Modern uygulamalarda yeniden kullanılabilirliği artırmak, entegrasyonları sadeleştirmek ve yazılım kalitesini yükseltmek amacıyla tasarlanmıştır.
Uyumluluk
- Python Versiyonu: 3.8+
- Platform Desteği: Tüm platformlar
- Kullanım Alanları: FastAPI servisleri, veri işleme pipeline'ları, model tabanlı uygulamalar
Özellikler
- ✅ Ortam değişkenlerini
.envdosyasından yükleyebilme (ConfiguratorEnvironment) - ✅ Dosyaya ve konsola loglama yapan, thread-safe
LoggerManager - ✅ Fonksiyonları çalışma süresine göre profilleyen
Profiler - ✅ Hugging Face üzerinde model ve veri yükleme/indirme işlemleri yapan
HuggingFaceHelper - ✅ Açık kaynak, genişletilebilir yapı
Kurulum
Pip ile Kurulum
pip install openbuffet-toolkit
Geliştirme Modunda Kurulum
git clone https://github.com/ferdikurnazdm/openbuffet_toolkit.git
cd openbuffet_toolkit
pip install -e .
Kullanım Örnekleri
LoggerManager Kullanımı
from openbuffet_toolkit.logger import LoggerManager
logger = LoggerManager().get_logger()
logger.info("Sistem başlatıldı.")
Ortam Değişkenlerini Yükleme
from openbuffet_toolkit.configurator import ConfiguratorEnvironment
config = ConfiguratorEnvironment()
api_key = config.get("API_KEY")
Profiler Dekoratörü
from openbuffet_toolkit.profiler import Profiler
@Profiler.time_taken(label="DEBUG: ")
def iş_yap():
# İşlem kodları
pass
HuggingFaceHelper ile Model Yönetimi
from openbuffet_toolkit.hfhelper import HuggingFaceHelper
hf = HuggingFaceHelper(
hf_username="kullaniciadi",
hf_token="hf_abc123",
hf_reponame="proje-adi",
local_dir="./model"
)
# Repository oluştur
hf.create_repo_if_not_exist()
# Dosya yükle
hf.upload_file("model_bundle.joblib")
# Dosya indir
hf.download_file("model_bundle.joblib", local_dir="./indirilenler")
Testler
Projeyi test etmek için:
pytest tests/
Katkı ve İletişim
Bu proje açık kaynaklıdır ve katkılara açıktır. Geri bildirim veya katkı için lütfen GitHub üzerinden issue oluşturun veya pull request gönderin.
Lisans
Bu proje MIT Lisansı ile lisanslanmıştır.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openbuffet_toolkit-0.1.0.tar.gz.
File metadata
- Download URL: openbuffet_toolkit-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6781109015f9e4b6b27499cc3a25dfdb553efe9c9a269a24a33f991efe4e7e16
|
|
| MD5 |
040834ef3dcbb91da55c795fd1d222a5
|
|
| BLAKE2b-256 |
b9d6cb3e571667e3f408376ed05fbf5eb74194d2ff4835610d741cab7fed08b9
|
File details
Details for the file openbuffet_toolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openbuffet_toolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65128747078b316b09c9e2bd39f493fbe260600b24db83b98be714c7fb04e31b
|
|
| MD5 |
2a4bd9c7afd6a27ebe562a2f0992ca1c
|
|
| BLAKE2b-256 |
534099e13ccfdb614998b3feb7357c5fa654251587b05ca9343a6c6b18f9b1f1
|