ramifice 0.8.46__py3-none-any.whl → 0.8.48__py3-none-any.whl
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.
- ramifice/utils/tools.py +0 -2
- {ramifice-0.8.46.dist-info → ramifice-0.8.48.dist-info}/METADATA +19 -15
- {ramifice-0.8.46.dist-info → ramifice-0.8.48.dist-info}/RECORD +5 -5
- {ramifice-0.8.46.dist-info → ramifice-0.8.48.dist-info}/WHEEL +0 -0
- {ramifice-0.8.46.dist-info → ramifice-0.8.48.dist-info}/licenses/LICENSE +0 -0
ramifice/utils/tools.py
CHANGED
@@ -13,7 +13,6 @@ __all__ = (
|
|
13
13
|
"is_phone",
|
14
14
|
"is_mongo_id",
|
15
15
|
"hash_to_obj_id",
|
16
|
-
"is_number",
|
17
16
|
)
|
18
17
|
|
19
18
|
import ipaddress
|
@@ -25,7 +24,6 @@ from urllib.parse import urlparse
|
|
25
24
|
import phonenumbers
|
26
25
|
from bson.objectid import ObjectId
|
27
26
|
from email_validator import EmailNotValidError, validate_email
|
28
|
-
from xloft.itis import is_number
|
29
27
|
|
30
28
|
from ramifice.utils.constants import REGEX
|
31
29
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ramifice
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.48
|
4
4
|
Summary: ORM-pseudo-like API MongoDB for Python language.
|
5
5
|
Project-URL: Homepage, https://github.com/kebasyaty/ramifice
|
6
6
|
Project-URL: Documentation, https://kebasyaty.github.io/ramifice/
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3
|
|
19
19
|
Classifier: Programming Language :: Python :: 3 :: Only
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
22
23
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
23
24
|
Classifier: Topic :: Database
|
24
25
|
Classifier: Typing :: Typed
|
@@ -331,9 +332,9 @@ class User:
|
|
331
332
|
)
|
332
333
|
```
|
333
334
|
|
334
|
-
## Class
|
335
|
+
## Class Methods
|
335
336
|
|
336
|
-
|
337
|
+
_Examples of frequently used methods:_
|
337
338
|
|
338
339
|
```python
|
339
340
|
# Gets an estimate of the count of documents in a collection using collection metadata.
|
@@ -452,9 +453,9 @@ unit = Unit(
|
|
452
453
|
await User.unit_manager(unit)
|
453
454
|
```
|
454
455
|
|
455
|
-
## Instance
|
456
|
+
## Instance Methods
|
456
457
|
|
457
|
-
|
458
|
+
_Examples of frequently used methods:_
|
458
459
|
|
459
460
|
```python
|
460
461
|
# Check data validity.
|
@@ -488,7 +489,8 @@ await user.update_password( # + verify_password
|
|
488
489
|
## General auxiliary methods
|
489
490
|
|
490
491
|
```python
|
491
|
-
from
|
492
|
+
from xloft.converters import to_human_size
|
493
|
+
from xloft.itis import is_number
|
492
494
|
from ramifice.utils.tools import (
|
493
495
|
get_file_size,
|
494
496
|
hash_to_obj_id,
|
@@ -500,9 +502,17 @@ from ramifice.utils.tools import (
|
|
500
502
|
is_phone,
|
501
503
|
is_url,
|
502
504
|
normal_email,
|
503
|
-
is_number,
|
504
505
|
)
|
505
506
|
|
507
|
+
|
508
|
+
# Convert the number of bytes into a human-readable format.
|
509
|
+
size: str = to_human_size(2097152)
|
510
|
+
print(size) # => 2 MB
|
511
|
+
|
512
|
+
# Check if a string is a number.
|
513
|
+
if is_number("5"):
|
514
|
+
...
|
515
|
+
|
506
516
|
# Validate Password.
|
507
517
|
if is_password("12345678"):
|
508
518
|
...
|
@@ -540,16 +550,10 @@ if is_mongo_id("666f6f2d6261722d71757578"):
|
|
540
550
|
from bson.objectid import ObjectId
|
541
551
|
_id: ObjectId | None = hash_to_obj_id("666f6f2d6261722d71757578")
|
542
552
|
|
543
|
-
# Convert the number of bytes into a human-readable format.
|
544
|
-
size: str = to_human_size(2097152) # => 2 MB
|
545
|
-
|
546
553
|
# Get file size in bytes.
|
547
554
|
path = "public/media/default/no_doc.odt"
|
548
|
-
size: int = get_file_size(path)
|
549
|
-
|
550
|
-
# Check if a string is a number.
|
551
|
-
if is_number("5"):
|
552
|
-
...
|
555
|
+
size: int = get_file_size(path)
|
556
|
+
print(size) # => 9843
|
553
557
|
```
|
554
558
|
|
555
559
|
## Changelog
|
@@ -74,10 +74,10 @@ ramifice/utils/errors.py,sha256=n2Fs7qZHP3w7t8Kyb1uRnNHLjuDhjD37iZe60-UM70s,2846
|
|
74
74
|
ramifice/utils/fixtures.py,sha256=nkrnkIEPeuswouY-cuve7uBh8-kc_J9T167UI_ZZcOQ,3496
|
75
75
|
ramifice/utils/migration.py,sha256=0yL9LwWqTentY_G57QLqQ1lOxzxqBPUvrpQNEyAjlyA,11422
|
76
76
|
ramifice/utils/mixins.py,sha256=5G3x8hK3igM7JBgCiCnVDdb_0K_D1gV1tw0QKpDlm-A,1161
|
77
|
-
ramifice/utils/tools.py,sha256=
|
77
|
+
ramifice/utils/tools.py,sha256=WOazw24pvL96-0yNBy7YRGErN3vAQ4F6GS9TLvWFqrs,2747
|
78
78
|
ramifice/utils/translations.py,sha256=YItvCWv-13FS2x8VYsAOH-Nx_qQOitOX7-bRGX3mc3A,4718
|
79
79
|
ramifice/utils/unit.py,sha256=zHfvkyEU4sxHOc-QMuntEcvyfQqH75AK1zx8E25kM9Y,2535
|
80
|
-
ramifice-0.8.
|
81
|
-
ramifice-0.8.
|
82
|
-
ramifice-0.8.
|
83
|
-
ramifice-0.8.
|
80
|
+
ramifice-0.8.48.dist-info/METADATA,sha256=RTMMW-4AkN5fxCw5BtH7sLoOr8GzOKpjZYSd-6MoZ2M,19099
|
81
|
+
ramifice-0.8.48.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
82
|
+
ramifice-0.8.48.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
|
83
|
+
ramifice-0.8.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|