tdatabase 1.0.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Taha Gaga
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.1
2
+ Name: tdatabase
3
+ Version: 1.0.0
4
+ Summary: Data Base Made In iran
5
+ Author: Tahagaga
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+
14
+ # TDatabase - اولین دیتابیس ایرانی مستقل 🇮🇷💥
15
+
16
+ **TDatabase** یک دیتابیس ایرانی مستقل است که به شما امکان می‌دهد داده‌ها را **ذخیره، ویرایش، لود و مدیریت** کنید، بدون نیاز به SQL یا دیتابیس‌های خارجی.
17
+ همراه با **GUI حرفه‌ای** و **کتابخانه پایتون** برای کار راحت توسعه‌دهندگان.
18
+
19
+ ## ویژگی‌ها ✨
20
+ - کاملاً مستقل و بومی ✅
21
+ - فایل‌های دیتابیس با پسوند `.px` 📦
22
+ - مدیریت داده‌ها با **GUI زیبا و ساده** 🖥️
23
+ - کتابخانه پایتون برای عملیات CRUD سریع 🐍
24
+ - ایجاد، باز کردن، ذخیره و لود دیتابیس جدید بدون دردسر 💾
25
+ - سبک و سریع ⚡
26
+
27
+ ## نصب 🛠️
28
+ ```bash
29
+ pip install tdatabase
@@ -0,0 +1,16 @@
1
+ # TDatabase - اولین دیتابیس ایرانی مستقل 🇮🇷💥
2
+
3
+ **TDatabase** یک دیتابیس ایرانی مستقل است که به شما امکان می‌دهد داده‌ها را **ذخیره، ویرایش، لود و مدیریت** کنید، بدون نیاز به SQL یا دیتابیس‌های خارجی.
4
+ همراه با **GUI حرفه‌ای** و **کتابخانه پایتون** برای کار راحت توسعه‌دهندگان.
5
+
6
+ ## ویژگی‌ها ✨
7
+ - کاملاً مستقل و بومی ✅
8
+ - فایل‌های دیتابیس با پسوند `.px` 📦
9
+ - مدیریت داده‌ها با **GUI زیبا و ساده** 🖥️
10
+ - کتابخانه پایتون برای عملیات CRUD سریع 🐍
11
+ - ایجاد، باز کردن، ذخیره و لود دیتابیس جدید بدون دردسر 💾
12
+ - سبک و سریع ⚡
13
+
14
+ ## نصب 🛠️
15
+ ```bash
16
+ pip install tdatabase
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,19 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='tdatabase',
5
+ version='1.0.0',
6
+ packages=find_packages(),
7
+ install_requires=[],
8
+ author='Tahagaga',
9
+ description='Data Base Made In iran',
10
+ long_description=open('README.md', encoding='utf-8').read(),
11
+ long_description_content_type='text/markdown',
12
+ license='MIT',
13
+ classifiers=[
14
+ 'Programming Language :: Python :: 3',
15
+ 'License :: OSI Approved :: MIT License',
16
+ 'Operating System :: OS Independent',
17
+ ],
18
+ python_requires='>=3.6',
19
+ )
@@ -0,0 +1 @@
1
+ from .core import create_db, append_cell, read_cell, read_all
@@ -0,0 +1,44 @@
1
+ import struct
2
+
3
+ MAGIC = b'PXDB'
4
+
5
+ def create_db(filename, rows, cols):
6
+ with open(filename, 'wb') as f:
7
+ f.write(MAGIC)
8
+ f.write(struct.pack('<HH', rows, cols))
9
+
10
+ def append_cell(filename, row, col, text):
11
+ data = text.encode('utf-8')
12
+ with open(filename, 'ab') as f:
13
+ f.write(struct.pack('<HHH', row, col, len(data)))
14
+ f.write(data)
15
+
16
+ def read_cell(filename, row, col):
17
+ with open(filename, 'rb') as f:
18
+ magic = f.read(4)
19
+ if magic != b'PXDB':
20
+ raise Exception("File is not exiting")
21
+ rows, cols = struct.unpack('<HH', f.read(4))
22
+ while True:
23
+ chunk = f.read(6)
24
+ if not chunk:
25
+ break
26
+ r, c, length = struct.unpack('<HHH', chunk)
27
+ data = f.read(length).decode('utf-8')
28
+ if r == row and c == col:
29
+ return data
30
+ return None
31
+ def read_all(filename):
32
+ data = {}
33
+ with open(filename, 'rb') as f:
34
+ if f.read(4) != MAGIC:
35
+ raise Exception("❌ Invalid file")
36
+ rows, cols = struct.unpack('<HH', f.read(4))
37
+ while True:
38
+ chunk = f.read(6)
39
+ if not chunk:
40
+ break
41
+ r, c, length = struct.unpack('<HHH', chunk)
42
+ text = f.read(length).decode('utf-8')
43
+ data[(r, c)] = text
44
+ return data, rows, cols
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.1
2
+ Name: tdatabase
3
+ Version: 1.0.0
4
+ Summary: Data Base Made In iran
5
+ Author: Tahagaga
6
+ License: MIT
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+
14
+ # TDatabase - اولین دیتابیس ایرانی مستقل 🇮🇷💥
15
+
16
+ **TDatabase** یک دیتابیس ایرانی مستقل است که به شما امکان می‌دهد داده‌ها را **ذخیره، ویرایش، لود و مدیریت** کنید، بدون نیاز به SQL یا دیتابیس‌های خارجی.
17
+ همراه با **GUI حرفه‌ای** و **کتابخانه پایتون** برای کار راحت توسعه‌دهندگان.
18
+
19
+ ## ویژگی‌ها ✨
20
+ - کاملاً مستقل و بومی ✅
21
+ - فایل‌های دیتابیس با پسوند `.px` 📦
22
+ - مدیریت داده‌ها با **GUI زیبا و ساده** 🖥️
23
+ - کتابخانه پایتون برای عملیات CRUD سریع 🐍
24
+ - ایجاد، باز کردن، ذخیره و لود دیتابیس جدید بدون دردسر 💾
25
+ - سبک و سریع ⚡
26
+
27
+ ## نصب 🛠️
28
+ ```bash
29
+ pip install tdatabase
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ setup.py
4
+ tdatabase/__init__.py
5
+ tdatabase/core.py
6
+ tdatabase.egg-info/PKG-INFO
7
+ tdatabase.egg-info/SOURCES.txt
8
+ tdatabase.egg-info/dependency_links.txt
9
+ tdatabase.egg-info/top_level.txt
10
+ tests/test_core.py
@@ -0,0 +1 @@
1
+ tdatabase
@@ -0,0 +1,4 @@
1
+ import TElectric
2
+
3
+ result = TElectric.power(current=5, voltage=220)
4
+ print(result) # باید خروجی بده: 1100