ramifice 0.8.45__py3-none-any.whl → 0.8.47__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.
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ramifice
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.47
|
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/
|
@@ -331,9 +331,9 @@ class User:
|
|
331
331
|
)
|
332
332
|
```
|
333
333
|
|
334
|
-
## Class
|
334
|
+
## Class Methods
|
335
335
|
|
336
|
-
|
336
|
+
_Examples of frequently used methods:_
|
337
337
|
|
338
338
|
```python
|
339
339
|
# Gets an estimate of the count of documents in a collection using collection metadata.
|
@@ -452,9 +452,9 @@ unit = Unit(
|
|
452
452
|
await User.unit_manager(unit)
|
453
453
|
```
|
454
454
|
|
455
|
-
## Instance
|
455
|
+
## Instance Methods
|
456
456
|
|
457
|
-
|
457
|
+
_Examples of frequently used methods:_
|
458
458
|
|
459
459
|
```python
|
460
460
|
# Check data validity.
|
@@ -488,7 +488,8 @@ await user.update_password( # + verify_password
|
|
488
488
|
## General auxiliary methods
|
489
489
|
|
490
490
|
```python
|
491
|
-
from
|
491
|
+
from xloft.converters import to_human_size
|
492
|
+
from xloft.itis import is_number
|
492
493
|
from ramifice.utils.tools import (
|
493
494
|
get_file_size,
|
494
495
|
hash_to_obj_id,
|
@@ -502,6 +503,15 @@ from ramifice.utils.tools import (
|
|
502
503
|
normal_email,
|
503
504
|
)
|
504
505
|
|
506
|
+
|
507
|
+
# Convert the number of bytes into a human-readable format.
|
508
|
+
size: str = to_human_size(2097152)
|
509
|
+
print(size) # => 2 MB
|
510
|
+
|
511
|
+
# Check if a string is a number.
|
512
|
+
if is_number("5"):
|
513
|
+
...
|
514
|
+
|
505
515
|
# Validate Password.
|
506
516
|
if is_password("12345678"):
|
507
517
|
...
|
@@ -539,12 +549,10 @@ if is_mongo_id("666f6f2d6261722d71757578"):
|
|
539
549
|
from bson.objectid import ObjectId
|
540
550
|
_id: ObjectId | None = hash_to_obj_id("666f6f2d6261722d71757578")
|
541
551
|
|
542
|
-
# Convert number of bytes to readable format.
|
543
|
-
size: str = to_human_size(2097152) # => 2 MB
|
544
|
-
|
545
552
|
# Get file size in bytes.
|
546
553
|
path = "public/media/default/no_doc.odt"
|
547
|
-
size: int = get_file_size(path)
|
554
|
+
size: int = get_file_size(path)
|
555
|
+
print(size) # => 9843
|
548
556
|
```
|
549
557
|
|
550
558
|
## Changelog
|
@@ -77,7 +77,7 @@ ramifice/utils/mixins.py,sha256=5G3x8hK3igM7JBgCiCnVDdb_0K_D1gV1tw0QKpDlm-A,1161
|
|
77
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.47.dist-info/METADATA,sha256=i_tQHS-uk__X8bzAXfv_1BVBNA6KkNZaw5h7hXxvX7A,19048
|
81
|
+
ramifice-0.8.47.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
82
|
+
ramifice-0.8.47.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
|
83
|
+
ramifice-0.8.47.dist-info/RECORD,,
|
File without changes
|
File without changes
|