Metadata-Version: 2.1
Name: batutils
Version: 2.1.0
Summary: Team Batcave's utilities for date and/or time objects and values and messing with types and so much more.
Author-email: Thordur Matthiasson <doddi79@gmail.com>, John Aldis <johnaldis@ccpgames.com>
License: MIT License
        
        Copyright (c) 2024-2025 Thordur Matthiasson
        Copyright (c) 2013-2024 CCP Games
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/doddi79/batutils
Project-URL: Documentation, https://github.com/doddi79/batutils/blob/main/README.md
Project-URL: Repository, https://github.com/doddi79/batutils.git
Project-URL: Issues, https://github.com/doddi79/batutils/issues
Project-URL: Changelog, https://github.com/doddi79/batutils/blob/main/CHANGELOG.md
Keywords: datetimeutils,datetime,typeutils,type,singleton,date,time,timespan,tools,batcave,utils
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE

# Team Batcave Python Toolkit

The `batutils` is a fork of the `batutils` package in order to continue its 
development and maintenance beyond Team Batcave's lifespan.  

It is a smooshup of a few Python packages from the CCP Tools Team of old (Team 
Batcave).

Our two most commonly used internal packages, called `datetimeutils` and 
`typeutils` were too _generically_ named for Pypi.org and since they were 
both used in something like 80-90% of our other projects, it made sense to 
just smoosh them together in one module, and thus, the `batutils` package 
was born.

Here's the README of the [Date Time Utils](batutils/dtu/README.md) submodule.

Here's the README of the [Type Utils](batutils/tpu/README.md) submodule.


### Changes from `ccptools`

The `legacyapi` submodule has been removed.


## Date-Time Utils

The old `datetimeutils` package is now included here as the `dtu` submodule.

```python
from batutils import dtu
```

## Structs

Importing `*` from the `structs` submodule will import all of the most 
commonly used imports in our projects:
```python
from typing import *  # For type annotation

import abc  # For interfaces (Abstract Base Classes)
import dataclasses  # For dataclass structs
import decimal  # Used whenever we're handling money
import enum  # Also used for struct creation
import logging  # Used pretty much everywhere
import re  # Used surprisingly frequently
import time  # Very commonly used
```

Note that datetime is not included in this. That's because tt'll also import 
the aliases from the Datetime Utils (`batutils.dtu.structs.aliases`) 
package instead:

```python
Date = datetime.date
Time = datetime.time
Datetime = datetime.datetime
TimeDelta = datetime.timedelta
TzInfo = datetime.tzinfo
TimeZone = datetime.timezone
```

Furthermore, it'll also include a few of the most commonly used utility 
classes from the Type Utils submodule:

- The `Singleton` Meta Class 
- The `Empty` and `EmptyDict` classes as well as the `if_empty` method
- The `EnumEx` base class for Enums with the `from_any` class method

So in most cases we can cover something like 90% of any imports we tend to 
need in every Python file with a single line:

```python
from batutils.structs import *
```
