true-core


Nametrue-core JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/alaamer12/true-core
SummaryA boilerplate utility package
upload_time2024-12-04 08:10:49
maintainerNone
docs_urlNone
authoralaamer12
requires_python<4.0,>=3.11
licenseMIT
keywords utilities boilerplate core
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # True-Core Python Library

A sophisticated Python utility library providing advanced enum management, type validation, time handling, regular expressions, and file operations.

## Core Components

### 1. Enum Management (`true.enum_registry`)
- **EnumRegistry**: Advanced enum combination and management
  - Merge multiple enum classes into a single registry
  - Type-safe operations and validation
  - Metadata support with descriptions, tags, and timestamps
  - Comprehensive filtering capabilities
  - Statistical analysis and serialization

### 2. Enum Toolkits (`true.enums_toolkits`)
- **Specialized Enum Classes**:
  - `DynamicEnum`: Runtime-modifiable enums
  - Type-safe enums: `ByteEnum`, `FloatEnum`, `ComplexNumberEnum`
  - Collection enums: `DictEnum`, `SetEnum`, `ListEnum`, `TupleEnum`
  - Iterator enums: `IterableEnum`, `IteratorEnum`, `GeneratorEnum`
- **Metadata Support**:
  - Custom attribute configuration
  - Type information tracking
  - Serialization capabilities

### 3. Collections (`true.collections`)
- **File System Operations**:
  - Secure file deletion and creation
  - Advanced file metadata handling
  - Cross-platform compatibility
  - File type-specific operations
- **File Management**:
  - RecycleBin with metadata tracking
  - Batch file operations
  - Directory watching
  - File statistics and analysis

### 4. Time Management (`true.time`)
- **Time Handling**:
  - Advanced timezone support
  - Time arithmetic and comparisons
  - Duration calculations
  - Event scheduling
- **Time Features**:
  - Time rounding and formatting
  - Timezone conversions
  - Performance timing decorators
  - Schedule management with conflict detection

### 5. Regular Expressions (`true.re`)
- **Validation Patterns**:
  - Username validation patterns
  - Password complexity patterns
  - Email format validation
  - Phone number formats
  - Credit card validation
  - URL pattern matching
  - Date format validation
  - IP address validation

### 6. Type System (`true.types`)
- **Version Types**:
  - SemVer, CalVer, DateVersion support
  - Version validation and comparison
- **Numeric Types**:
  - `BigInt` and `BigDecimal` with validation
  - Scientific number handling
  - Validated numeric types
- **ID Types**:
  - UUID/ULID support with versions
  - String and integer-based IDs
- **Serialization**:
  - JSON, YAML, TOML support
  - Type conversion utilities

### 7. Exception Handling (`true.exceptions`)
- **Specialized Exceptions**:
  - Enum-related exceptions
  - Type validation errors
  - Schedule management errors
  - File operation errors
  - Access control exceptions
  - Configuration errors

## Installation

```bash
pip install true-core
```

## Quick Start

```python
from true.enum_registry import EnumRegistry
from true.collections import OSUtils
from true.time import Time, Schedule, Event, TimeUnit
from true.types import BigInt, Version
from enum import Enum

# Enum Registry Example
class ColorEnum(Enum):
    RED = 1
    BLUE = 2

registry = EnumRegistry([ColorEnum])
int_values = registry.filter.by_value_type(int)

# Time Management Example
time = Time.now()
schedule = Schedule()
event = Event(name="Meeting", start_time=time, end_time=time.add(1, TimeUnit.HOURS))
schedule.add_event(event)

# Type Validation Example
version = Version("1.2.3")
big_num = BigInt(1000000, context="Positive")

# File Operations Example
utils = OSUtils()
utils.force_delete("path/to/file")  # Secure deletion
utils.watch_directory("path/to/dir", callback=lambda event: print(f"Change: {event.src_path}"))
```

## Requirements

- Python 3.8+
- Platform-specific dependencies:
  - Windows: `pywin32` for advanced file operations
  - Unix: Standard Python libraries
- Optional dependencies:
  - `pytz` for timezone support
  - `pydub` for audio file handling
  - `Pillow` for image processing

## Documentation

For detailed documentation, see [docs](https://true-core.readthedocs.io/en/latest/).

## License

MIT License - See LICENSE file for details.

## Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## Support

For support:
1. Check the documentation
2. Search existing issues
3. Create a new issue if needed

## Author

Alaamer - https://github.com/alaamer12

## Acknowledgments

- [PyPI](https://pypi.org/project/true-core/)
- [GitHub](https://github.com/alaamer12/true-core)
- [Python](https://www.python.org/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/alaamer12/true-core",
    "name": "true-core",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "utilities, boilerplate, core",
    "author": "alaamer12",
    "author_email": "ahmedmuhmmed239@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a5/80/92a803170397aefe1c02804b09c33235190093a9ffe0b89067d7439117b0/true_core-0.1.3.tar.gz",
    "platform": null,
    "description": "# True-Core Python Library\n\nA sophisticated Python utility library providing advanced enum management, type validation, time handling, regular expressions, and file operations.\n\n## Core Components\n\n### 1. Enum Management (`true.enum_registry`)\n- **EnumRegistry**: Advanced enum combination and management\n  - Merge multiple enum classes into a single registry\n  - Type-safe operations and validation\n  - Metadata support with descriptions, tags, and timestamps\n  - Comprehensive filtering capabilities\n  - Statistical analysis and serialization\n\n### 2. Enum Toolkits (`true.enums_toolkits`)\n- **Specialized Enum Classes**:\n  - `DynamicEnum`: Runtime-modifiable enums\n  - Type-safe enums: `ByteEnum`, `FloatEnum`, `ComplexNumberEnum`\n  - Collection enums: `DictEnum`, `SetEnum`, `ListEnum`, `TupleEnum`\n  - Iterator enums: `IterableEnum`, `IteratorEnum`, `GeneratorEnum`\n- **Metadata Support**:\n  - Custom attribute configuration\n  - Type information tracking\n  - Serialization capabilities\n\n### 3. Collections (`true.collections`)\n- **File System Operations**:\n  - Secure file deletion and creation\n  - Advanced file metadata handling\n  - Cross-platform compatibility\n  - File type-specific operations\n- **File Management**:\n  - RecycleBin with metadata tracking\n  - Batch file operations\n  - Directory watching\n  - File statistics and analysis\n\n### 4. Time Management (`true.time`)\n- **Time Handling**:\n  - Advanced timezone support\n  - Time arithmetic and comparisons\n  - Duration calculations\n  - Event scheduling\n- **Time Features**:\n  - Time rounding and formatting\n  - Timezone conversions\n  - Performance timing decorators\n  - Schedule management with conflict detection\n\n### 5. Regular Expressions (`true.re`)\n- **Validation Patterns**:\n  - Username validation patterns\n  - Password complexity patterns\n  - Email format validation\n  - Phone number formats\n  - Credit card validation\n  - URL pattern matching\n  - Date format validation\n  - IP address validation\n\n### 6. Type System (`true.types`)\n- **Version Types**:\n  - SemVer, CalVer, DateVersion support\n  - Version validation and comparison\n- **Numeric Types**:\n  - `BigInt` and `BigDecimal` with validation\n  - Scientific number handling\n  - Validated numeric types\n- **ID Types**:\n  - UUID/ULID support with versions\n  - String and integer-based IDs\n- **Serialization**:\n  - JSON, YAML, TOML support\n  - Type conversion utilities\n\n### 7. Exception Handling (`true.exceptions`)\n- **Specialized Exceptions**:\n  - Enum-related exceptions\n  - Type validation errors\n  - Schedule management errors\n  - File operation errors\n  - Access control exceptions\n  - Configuration errors\n\n## Installation\n\n```bash\npip install true-core\n```\n\n## Quick Start\n\n```python\nfrom true.enum_registry import EnumRegistry\nfrom true.collections import OSUtils\nfrom true.time import Time, Schedule, Event, TimeUnit\nfrom true.types import BigInt, Version\nfrom enum import Enum\n\n# Enum Registry Example\nclass ColorEnum(Enum):\n    RED = 1\n    BLUE = 2\n\nregistry = EnumRegistry([ColorEnum])\nint_values = registry.filter.by_value_type(int)\n\n# Time Management Example\ntime = Time.now()\nschedule = Schedule()\nevent = Event(name=\"Meeting\", start_time=time, end_time=time.add(1, TimeUnit.HOURS))\nschedule.add_event(event)\n\n# Type Validation Example\nversion = Version(\"1.2.3\")\nbig_num = BigInt(1000000, context=\"Positive\")\n\n# File Operations Example\nutils = OSUtils()\nutils.force_delete(\"path/to/file\")  # Secure deletion\nutils.watch_directory(\"path/to/dir\", callback=lambda event: print(f\"Change: {event.src_path}\"))\n```\n\n## Requirements\n\n- Python 3.8+\n- Platform-specific dependencies:\n  - Windows: `pywin32` for advanced file operations\n  - Unix: Standard Python libraries\n- Optional dependencies:\n  - `pytz` for timezone support\n  - `pydub` for audio file handling\n  - `Pillow` for image processing\n\n## Documentation\n\nFor detailed documentation, see [docs](https://true-core.readthedocs.io/en/latest/).\n\n## License\n\nMIT License - See LICENSE file for details.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a Pull Request\n\n## Support\n\nFor support:\n1. Check the documentation\n2. Search existing issues\n3. Create a new issue if needed\n\n## Author\n\nAlaamer - https://github.com/alaamer12\n\n## Acknowledgments\n\n- [PyPI](https://pypi.org/project/true-core/)\n- [GitHub](https://github.com/alaamer12/true-core)\n- [Python](https://www.python.org/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A boilerplate utility package",
    "version": "0.1.3",
    "project_urls": {
        "Documentation": "https://true-core.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/alaamer12/true-core",
        "Repository": "https://github.com/alaamer12/true-core"
    },
    "split_keywords": [
        "utilities",
        " boilerplate",
        " core"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b552296386a3e7837e3922ad8774537a52284c38329ab7b2fa958e81bd972ea",
                "md5": "f067be56e26f2fb37e7b8b7e0f2b571c",
                "sha256": "b87a80f1732926cc591f23b15c6924eb511cbdd0217a8d595c0010430bf1a800"
            },
            "downloads": -1,
            "filename": "true_core-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f067be56e26f2fb37e7b8b7e0f2b571c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 79695,
            "upload_time": "2024-12-04T08:10:48",
            "upload_time_iso_8601": "2024-12-04T08:10:48.704546Z",
            "url": "https://files.pythonhosted.org/packages/4b/55/2296386a3e7837e3922ad8774537a52284c38329ab7b2fa958e81bd972ea/true_core-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a58092a803170397aefe1c02804b09c33235190093a9ffe0b89067d7439117b0",
                "md5": "cb31ec67bd50cb642acb47d691ea1c75",
                "sha256": "aeb1af5107d4d0262ceb7251a7543ddfc2ce8ab1ee3da5d4aadcb19322920160"
            },
            "downloads": -1,
            "filename": "true_core-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "cb31ec67bd50cb642acb47d691ea1c75",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 69530,
            "upload_time": "2024-12-04T08:10:49",
            "upload_time_iso_8601": "2024-12-04T08:10:49.855321Z",
            "url": "https://files.pythonhosted.org/packages/a5/80/92a803170397aefe1c02804b09c33235190093a9ffe0b89067d7439117b0/true_core-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-04 08:10:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alaamer12",
    "github_project": "true-core",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "true-core"
}
        
Elapsed time: 0.38645s