ramifice 0.8.35__py3-none-any.whl → 0.8.38__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.35
3
+ Version: 0.8.38
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/
@@ -43,7 +43,7 @@ Description-Content-Type: text/markdown
43
43
  <p align="center">
44
44
  <a href="https://github.com/kebasyaty/ramifice">
45
45
  <img
46
- height="90"
46
+ height="60"
47
47
  alt="Logo"
48
48
  src="https://raw.githubusercontent.com/kebasyaty/ramifice/v0/assets/logo.svg">
49
49
  </a>
@@ -250,15 +250,6 @@ async def main():
250
250
  else:
251
251
  print("No User!")
252
252
 
253
- # Remove User.
254
- # (if necessary)
255
- # await user.delete()
256
- # await user.delete(remove_files=False)
257
-
258
- # Remove collection.
259
- # (if necessary)
260
- # await User.collection().drop()
261
-
262
253
  # Close connection.
263
254
  await client.close()
264
255
 
@@ -267,65 +258,8 @@ if __name__ == "__main__":
267
258
  asyncio.run(main())
268
259
  ```
269
260
 
270
- ### How to create custom translations ?
271
-
272
- ```python
273
- from ramifice import translations
274
-
275
- translations.add_languages(
276
- default_locale="en", # For Ramifice by default = "en"
277
- languages=frozenset(("en", "ru")), # For Ramifice by default = ["en", "ru"]
278
- )
279
- ```
280
-
281
- ```shell
282
- cd project_name
283
- # Add your custom translations:
284
- uv run pybabel extract -o config/translations/custom.pot src
285
- uv run pybabel init -i config/translations/custom.pot -d config/translations/custom -l en
286
- uv run pybabel init -i config/translations/custom.pot -d config/translations/custom -l ru
287
- ...
288
- # Hint: Do not forget to add translations for new languages.
289
- uv run pybabel compile -d config/translations/custom
290
-
291
- # Update your custom translations:
292
- uv run pybabel extract -o config/translations/custom.pot src
293
- uv run pybabel update -i config/translations/custom.pot -d config/translations/custom
294
- # Hint: Do not forget to check the translations for existing languages.
295
- uv run pybabel compile -d config/translations/custom
296
- ```
297
-
298
- ### How to add new languages ​​to Ramifice ?
299
-
300
- ```python
301
- from ramifice import translations
302
-
303
- translations.add_languages(
304
- default_locale="en", # For Ramifice by default = "en"
305
- languages=frozenset(("en", "ru", "de", "de_ch")), # For Ramifice by default = ["en", "ru"]
306
- )
307
- ```
308
-
309
- ```shell
310
- cd project_name
311
- # Example:
312
- uv run pybabel init -i config/translations/ramifice.pot -d config/translations/ramifice -l de
313
- uv run pybabel init -i config/translations/ramifice.pot -d config/translations/ramifice -l de_ch
314
- ...
315
- # Hint: Do not forget to add translations for new languages.
316
- uv run pybabel compile -d config/translations/ramifice
317
-
318
- # Update translations to Ramifice:
319
- uv run pybabel extract -o config/translations/ramifice.pot ramifice
320
- uv run pybabel update -i config/translations/ramifice.pot -d config/translations/ramifice
321
- # Hint: Do not forget to check the translations for existing languages.
322
- uv run pybabel compile -d config/translations/ramifice
323
- ```
324
-
325
261
  ## Model Parameters
326
262
 
327
- [See the documentation here.](https://kebasyaty.github.io/ramifice/ "See the documentation here.")
328
-
329
263
  ( only `service_name` is a required parameter )
330
264
 
331
265
  <div>
@@ -554,6 +488,7 @@ await user.update_password( # + verify_password
554
488
  ## General auxiliary methods
555
489
 
556
490
  ```python
491
+ from ramifice import to_human_size
557
492
  from ramifice.utils.tools import (
558
493
  get_file_size,
559
494
  hash_to_obj_id,
@@ -565,7 +500,6 @@ from ramifice.utils.tools import (
565
500
  is_phone,
566
501
  is_url,
567
502
  normal_email,
568
- to_human_size,
569
503
  )
570
504
 
571
505
  # Validate Password.
@@ -606,7 +540,7 @@ from bson.objectid import ObjectId
606
540
  _id: ObjectId | None = hash_to_obj_id("666f6f2d6261722d71757578")
607
541
 
608
542
  # Convert number of bytes to readable format.
609
- size: str = to_human_size(2097152) # => 2.0 MB
543
+ size: str = to_human_size(2097152) # => 2 MB
610
544
 
611
545
  # Get file size in bytes.
612
546
  path = "public/media/default/no_doc.odt"
@@ -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.35.dist-info/METADATA,sha256=-s9JbtD2V2Qv2wKlEYvtc8EvSc9l3cBPR7x8esFa7Sk,21112
81
- ramifice-0.8.35.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
- ramifice-0.8.35.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
83
- ramifice-0.8.35.dist-info/RECORD,,
80
+ ramifice-0.8.38.dist-info/METADATA,sha256=_VejZLoYgURbynuQIQdV2j2aGmyWofGAl_WV1ToZRdk,18883
81
+ ramifice-0.8.38.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
+ ramifice-0.8.38.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
83
+ ramifice-0.8.38.dist-info/RECORD,,