Kekik 1.6.3__tar.gz → 1.6.4__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.
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/cache.py +21 -12
- {kekik-1.6.3 → kekik-1.6.4}/Kekik.egg-info/PKG-INFO +1 -1
- {kekik-1.6.3 → kekik-1.6.4}/PKG-INFO +1 -1
- {kekik-1.6.3 → kekik-1.6.4}/setup.py +1 -1
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/BIST.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Domain2IP.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Nesne.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/AESManager.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/CryptoJS.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/HexCodec.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/NaysHash.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/Packer.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/StringCodec.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/Sifreleme/__init__.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/__init__.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/cli.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/csv2dict.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/dict2csv.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/dict2json.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/dosya2set.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/dosya_indir.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/hwid_kontrol.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/kisi_ver/__init__.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/kisi_ver/biyografiler.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/kisi_ver/isimler.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/kisi_ver/soyisimler.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/link_islemleri.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/list2html.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/liste_fetis.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/mail_gonder.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/okunabilir_byte.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/proxy_ver.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/qr_ver.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/ses_fetis.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/slugify.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/terminal_baslik.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/txt_fetis.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/unicode_tr.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik/zaman_donustur.py +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik.egg-info/SOURCES.txt +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik.egg-info/dependency_links.txt +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik.egg-info/entry_points.txt +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik.egg-info/requires.txt +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/Kekik.egg-info/top_level.txt +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/LICENSE +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/MANIFEST.in +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/README.md +0 -0
- {kekik-1.6.3 → kekik-1.6.4}/setup.cfg +0 -0
|
@@ -89,29 +89,38 @@ def _sync_maybe_cache(func, key, result, unless):
|
|
|
89
89
|
|
|
90
90
|
async def _async_compute_and_cache(func, key, unless, *args, **kwargs):
|
|
91
91
|
"""
|
|
92
|
-
Asenkron fonksiyon
|
|
93
|
-
|
|
92
|
+
Asenkron fonksiyon sonucunu hesaplar ve cache'e ekler.
|
|
93
|
+
Aynı key için işlem devam ediyorsa, mevcut sonucu bekler.
|
|
94
|
+
Sonuç, unless(result) True değilse cache'e eklenir.
|
|
94
95
|
"""
|
|
95
|
-
cache
|
|
96
|
+
# __cache'den cache nesnesini alıyoruz.
|
|
97
|
+
cache = func.__cache
|
|
98
|
+
|
|
99
|
+
# Aynı key için aktif bir future varsa, onun sonucunu döndür.
|
|
100
|
+
if key in cache.futures:
|
|
101
|
+
return await cache.futures[key]
|
|
102
|
+
|
|
103
|
+
# Yeni future oluşturuluyor ve cache.futures'e ekleniyor.
|
|
96
104
|
future = asyncio.Future()
|
|
97
105
|
cache.futures[key] = future
|
|
98
106
|
|
|
99
107
|
try:
|
|
108
|
+
# Asenkron fonksiyonu çalıştır ve sonucu elde et.
|
|
100
109
|
result = await func(*args, **kwargs)
|
|
110
|
+
future.set_result(result)
|
|
111
|
+
|
|
112
|
+
# unless koşuluna göre cache'e ekleme yap.
|
|
113
|
+
if unless is None or not unless(result):
|
|
114
|
+
await cache.set(key, result)
|
|
115
|
+
|
|
116
|
+
return result
|
|
101
117
|
except Exception as exc:
|
|
102
|
-
cache.futures.pop(key, None)
|
|
103
118
|
future.cancel()
|
|
104
119
|
raise exc
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if unless is None or not unless(result):
|
|
109
|
-
cache[key] = result
|
|
110
|
-
else:
|
|
120
|
+
finally:
|
|
121
|
+
# İşlem tamamlandığında future'ı temizle.
|
|
111
122
|
cache.futures.pop(key, None)
|
|
112
123
|
|
|
113
|
-
return result
|
|
114
|
-
|
|
115
124
|
async def make_cache_key(args, kwargs, is_fastapi=False):
|
|
116
125
|
"""
|
|
117
126
|
Cache key'ini oluşturur.
|
|
@@ -6,7 +6,7 @@ from io import open
|
|
|
6
6
|
setup(
|
|
7
7
|
# ? Genel Bilgiler
|
|
8
8
|
name = "Kekik",
|
|
9
|
-
version = "1.6.
|
|
9
|
+
version = "1.6.4",
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|