Kekik 1.6.9__tar.gz → 1.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of Kekik might be problematic. Click here for more details.

Files changed (48) hide show
  1. {kekik-1.6.9 → kekik-1.7.0}/Kekik/cache.py +11 -8
  2. {kekik-1.6.9 → kekik-1.7.0}/Kekik.egg-info/PKG-INFO +1 -1
  3. {kekik-1.6.9 → kekik-1.7.0}/PKG-INFO +1 -1
  4. {kekik-1.6.9 → kekik-1.7.0}/setup.py +1 -1
  5. {kekik-1.6.9 → kekik-1.7.0}/Kekik/BIST.py +0 -0
  6. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Domain2IP.py +0 -0
  7. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Nesne.py +0 -0
  8. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/AESManager.py +0 -0
  9. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/CryptoJS.py +0 -0
  10. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/HexCodec.py +0 -0
  11. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/NaysHash.py +0 -0
  12. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/Packer.py +0 -0
  13. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/StringCodec.py +0 -0
  14. {kekik-1.6.9 → kekik-1.7.0}/Kekik/Sifreleme/__init__.py +0 -0
  15. {kekik-1.6.9 → kekik-1.7.0}/Kekik/__init__.py +0 -0
  16. {kekik-1.6.9 → kekik-1.7.0}/Kekik/cli.py +0 -0
  17. {kekik-1.6.9 → kekik-1.7.0}/Kekik/csv2dict.py +0 -0
  18. {kekik-1.6.9 → kekik-1.7.0}/Kekik/dict2csv.py +0 -0
  19. {kekik-1.6.9 → kekik-1.7.0}/Kekik/dict2json.py +0 -0
  20. {kekik-1.6.9 → kekik-1.7.0}/Kekik/dosya2set.py +0 -0
  21. {kekik-1.6.9 → kekik-1.7.0}/Kekik/dosya_indir.py +0 -0
  22. {kekik-1.6.9 → kekik-1.7.0}/Kekik/hwid_kontrol.py +0 -0
  23. {kekik-1.6.9 → kekik-1.7.0}/Kekik/kisi_ver/__init__.py +0 -0
  24. {kekik-1.6.9 → kekik-1.7.0}/Kekik/kisi_ver/biyografiler.py +0 -0
  25. {kekik-1.6.9 → kekik-1.7.0}/Kekik/kisi_ver/isimler.py +0 -0
  26. {kekik-1.6.9 → kekik-1.7.0}/Kekik/kisi_ver/soyisimler.py +0 -0
  27. {kekik-1.6.9 → kekik-1.7.0}/Kekik/link_islemleri.py +0 -0
  28. {kekik-1.6.9 → kekik-1.7.0}/Kekik/list2html.py +0 -0
  29. {kekik-1.6.9 → kekik-1.7.0}/Kekik/liste_fetis.py +0 -0
  30. {kekik-1.6.9 → kekik-1.7.0}/Kekik/mail_gonder.py +0 -0
  31. {kekik-1.6.9 → kekik-1.7.0}/Kekik/okunabilir_byte.py +0 -0
  32. {kekik-1.6.9 → kekik-1.7.0}/Kekik/proxy_ver.py +0 -0
  33. {kekik-1.6.9 → kekik-1.7.0}/Kekik/qr_ver.py +0 -0
  34. {kekik-1.6.9 → kekik-1.7.0}/Kekik/ses_fetis.py +0 -0
  35. {kekik-1.6.9 → kekik-1.7.0}/Kekik/slugify.py +0 -0
  36. {kekik-1.6.9 → kekik-1.7.0}/Kekik/terminal_baslik.py +0 -0
  37. {kekik-1.6.9 → kekik-1.7.0}/Kekik/txt_fetis.py +0 -0
  38. {kekik-1.6.9 → kekik-1.7.0}/Kekik/unicode_tr.py +0 -0
  39. {kekik-1.6.9 → kekik-1.7.0}/Kekik/zaman_donustur.py +0 -0
  40. {kekik-1.6.9 → kekik-1.7.0}/Kekik.egg-info/SOURCES.txt +0 -0
  41. {kekik-1.6.9 → kekik-1.7.0}/Kekik.egg-info/dependency_links.txt +0 -0
  42. {kekik-1.6.9 → kekik-1.7.0}/Kekik.egg-info/entry_points.txt +0 -0
  43. {kekik-1.6.9 → kekik-1.7.0}/Kekik.egg-info/requires.txt +0 -0
  44. {kekik-1.6.9 → kekik-1.7.0}/Kekik.egg-info/top_level.txt +0 -0
  45. {kekik-1.6.9 → kekik-1.7.0}/LICENSE +0 -0
  46. {kekik-1.6.9 → kekik-1.7.0}/MANIFEST.in +0 -0
  47. {kekik-1.6.9 → kekik-1.7.0}/README.md +0 -0
  48. {kekik-1.6.9 → kekik-1.7.0}/setup.cfg +0 -0
@@ -75,11 +75,20 @@ class AsyncCache(Cache):
75
75
  for key in keys:
76
76
  self.remove_if_expired(key)
77
77
 
78
+ def ensure_cleanup_task(self):
79
+ """Event loop mevcutsa, cleanup task henüz başlatılmadıysa oluştur."""
80
+ if self._cleanup_task is None:
81
+ try:
82
+ self._cleanup_task = asyncio.get_running_loop().create_task(self._auto_cleanup())
83
+ except RuntimeError:
84
+ pass # Yine loop yoksa yapacak bir şey yok
85
+
78
86
  async def get(self, key):
79
87
  """
80
88
  Belirtilen key için cache'de saklanan değeri asenkron olarak döndürür.
81
89
  Eğer key bulunamazsa, ilgili future üzerinden beklemeyi sağlar.
82
90
  """
91
+ self.ensure_cleanup_task()
83
92
  self.remove_if_expired(key)
84
93
 
85
94
  try:
@@ -202,13 +211,11 @@ def kekik_cache(ttl=UNLIMITED, unless=None, is_fastapi=False):
202
211
  return kekik_cache(UNLIMITED, unless=unless, is_fastapi=is_fastapi)(ttl)
203
212
 
204
213
  def decorator(func):
214
+ func.__cache = AsyncCache(ttl)
215
+
205
216
  if asyncio.iscoroutinefunction(func):
206
217
  @wraps(func)
207
218
  async def async_wrapper(*args, **kwargs):
208
- # Lazy initialization: İlk çağrıda cache oluşturuluyor
209
- if not hasattr(func, "__cache"):
210
- func.__cache = AsyncCache(ttl)
211
-
212
219
  key = await make_cache_key(args, kwargs, is_fastapi)
213
220
 
214
221
  try:
@@ -220,10 +227,6 @@ def kekik_cache(ttl=UNLIMITED, unless=None, is_fastapi=False):
220
227
  else:
221
228
  @wraps(func)
222
229
  def sync_wrapper(*args, **kwargs):
223
- # Lazy initialization: İlk çağrıda cache oluşturuluyor
224
- if not hasattr(func, "__cache"):
225
- func.__cache = AsyncCache(ttl)
226
-
227
230
  key = (args, tuple(sorted(kwargs.items())))
228
231
 
229
232
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: Kekik
3
- Version: 1.6.9
3
+ Version: 1.7.0
4
4
  Summary: İşlerimizi kolaylaştıracak fonksiyonların el altında durduğu kütüphane..
5
5
  Home-page: https://github.com/keyiflerolsun/Kekik
6
6
  Author: keyiflerolsun
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: Kekik
3
- Version: 1.6.9
3
+ Version: 1.7.0
4
4
  Summary: İşlerimizi kolaylaştıracak fonksiyonların el altında durduğu kütüphane..
5
5
  Home-page: https://github.com/keyiflerolsun/Kekik
6
6
  Author: keyiflerolsun
@@ -6,7 +6,7 @@ from io import open
6
6
  setup(
7
7
  # ? Genel Bilgiler
8
8
  name = "Kekik",
9
- version = "1.6.9",
9
+ version = "1.7.0",
10
10
  url = "https://github.com/keyiflerolsun/Kekik",
11
11
  description = "İşlerimizi kolaylaştıracak fonksiyonların el altında durduğu kütüphane..",
12
12
  keywords = ["Kekik", "KekikAkademi", "keyiflerolsun"],
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes