Smart-babylon-library

Latest version: v0.6.1

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.6.1

Configuration:

You can customize the library behavior by changing the parameters in the class constructors:

For `TextEncoder`:
- `charset`: The character set for encoding and decoding texts. By default, it includes Latin letters, numbers, punctuation marks, spaces, and Cyrillic.

For `LibraryStructure`:
- `charset`: The character set for encoding and decoding texts.
- `max_page_content_length`: The maximum length of text on a page.
- `num_walls`: The number of walls in the library.
- `num_shelves`: The number of shelves on a wall.
- `num_volumes`: The number of volumes on a shelf.
- `num_pages`: The number of pages in a volume.
- `hexagon_base`: The base of the number system for encoding addresses.

For `BabylonLibrary`:
- `charset`: The character set for generating texts (default: Cyrillic, digits, Latin letters (uppercase and lowercase), punctuation, and space).
- `page_length`: The length of the text on each page (default: 3200 characters).
- `max_rooms`: The maximum number of rooms in the library (default: 100).
- `max_walls`: The maximum number of walls per room (default: 6).
- `max_shelves`: The maximum number of shelves per wall (default: 10).
- `max_volumes`: The maximum number of volumes per shelf (default: 10).
- `max_books`: The maximum number of books per volume (default: 100).
- `max_pages`: The maximum number of pages per book (default: 1000).

For `SmartBabylonLibrary`:
- `charset`: The character set for generating texts (default: Cyrillic, Latin letters, and digits).
- `page_length`: The length of the text on each page (default: 3200).
- `max_rooms`: The maximum number of rooms in the library (default: 100).
- `max_walls`: The maximum number of walls per room (default: 6).
- `max_shelves`: The maximum number of shelves per wall (default: 10).
- `max_volumes`: The maximum number of volumes per shelf (default: 10).
- `max_books`: The maximum number of books per volume (default: 100).
- `max_pages`: The maximum number of pages per book (default: 1000).

Project Structure

- **`smart_babylon_library.py`**: `SmartBabylonLibrary` implementation for generating realistic books with titles and pages.
- **`babylon_library.py`**: `BabylonLibrary` implementation for generating deterministic texts.
- **`library_structure.py`**: `LibraryStructure` implementation for working with library coordinates.
- **`text_encoder.py`**: `TextEncoder` implementation for encoding and decoding texts.
- **`config.py`**: Library configuration parameters.
- **`tools.py`**: Helper functions (e.g., `timeit` decorator).
- **`example.py`**: Example of library usage.

0.5.0

- Fixed bugs
- Improved generators
- Optimized performance

0.4.3

0.4.2

- Fixed errors.
- Added tests.

0.4.1

0.3.1

Smart Babylon Library

**Smart Babylon Library** is a Python library inspired by my
own concept of [smart passwords](https://github.com/smartlegionlab/smartpasslib),
as well as by the concept of the Babylonian Library by Jorge Luis Borges.
It allows you to generate unique addresses for texts that are not physically stored,
but can be restored using previously generated addresses.
This allows you to find and extract information by specified parameters without storing the texts themselves.

---

Main features

- **Generate unique addresses**: Create unique addresses for texts that can be used for subsequent search.
- **Search by address**: Extract text using a previously generated address.
- **Support for different number systems**: Use different number systems for encoding addresses.
- **Custom character set**: Ability to use your own character set for encoding and decoding texts.
- **Generate random coordinates**: Generate random coordinates (wall, shelf, volume, page) for texts.

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.