batutils


Namebatutils JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummaryTeam Batcave's utilities for date and/or time objects and values and messing with types and so much more.
upload_time2024-11-14 15:41:06
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024 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.
keywords datetimeutils datetime typeutils type singleton date time timespan tools batcave utils
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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 *
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "batutils",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "datetimeutils, datetime, typeutils, type, singleton, date, time, timespan, tools, batcave, utils",
    "author": null,
    "author_email": "Thordur Matthiasson <doddi79@gmail.com>, John Aldis <johnaldis@ccpgames.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/78/3ddfbd8f27d395b1be6671b0c85419a01ffb71488045f957528b7846df36/batutils-2.0.0.tar.gz",
    "platform": null,
    "description": "# Team Batcave Python Toolkit\n\nThe `batutils` is a fork of the `batutils` package in order to continue its \ndevelopment and maintenance beyond Team Batcave's lifespan.  \n\nIt is a smooshup of a few Python packages from the CCP Tools Team of old (Team \nBatcave).\n\nOur two most commonly used internal packages, called `datetimeutils` and \n`typeutils` were too _generically_ named for Pypi.org and since they were \nboth used in something like 80-90% of our other projects, it made sense to \njust smoosh them together in one module, and thus, the `batutils` package \nwas born.\n\nHere's the README of the [Date Time Utils](batutils/dtu/README.md) submodule.\n\nHere's the README of the [Type Utils](batutils/tpu/README.md) submodule.\n\n\n### Changes from `ccptools`\n\nThe `legacyapi` submodule has been removed.\n\n\n## Date-Time Utils\n\nThe old `datetimeutils` package is now included here as the `dtu` submodule.\n\n```python\nfrom batutils import dtu\n```\n\n## Structs\n\nImporting `*` from the `structs` submodule will import all of the most \ncommonly used imports in our projects:\n```python\nfrom typing import *  # For type annotation\n\nimport abc  # For interfaces (Abstract Base Classes)\nimport dataclasses  # For dataclass structs\nimport decimal  # Used whenever we're handling money\nimport enum  # Also used for struct creation\nimport logging  # Used pretty much everywhere\nimport re  # Used surprisingly frequently\nimport time  # Very commonly used\n```\n\nNote that datetime is not included in this. That's because tt'll also import \nthe aliases from the Datetime Utils (`batutils.dtu.structs.aliases`) \npackage instead:\n\n```python\nDate = datetime.date\nTime = datetime.time\nDatetime = datetime.datetime\nTimeDelta = datetime.timedelta\nTzInfo = datetime.tzinfo\nTimeZone = datetime.timezone\n```\n\nFurthermore, it'll also include a few of the most commonly used utility \nclasses from the Type Utils submodule:\n\n- The `Singleton` Meta Class \n- The `Empty` and `EmptyDict` classes as well as the `if_empty` method\n- The `EnumEx` base class for Enums with the `from_any` class method\n\nSo in most cases we can cover something like 90% of any imports we tend to \nneed in every Python file with a single line:\n\n```python\nfrom batutils.structs import *\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 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. ",
    "summary": "Team Batcave's utilities for date and/or time objects and values and messing with types and so much more.",
    "version": "2.0.0",
    "project_urls": {
        "Changelog": "https://github.com/doddi79/batutils/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/doddi79/batutils/blob/main/README.md",
        "Homepage": "https://github.com/doddi79/batutils",
        "Issues": "https://github.com/doddi79/batutils/issues",
        "Repository": "https://github.com/doddi79/batutils.git"
    },
    "split_keywords": [
        "datetimeutils",
        " datetime",
        " typeutils",
        " type",
        " singleton",
        " date",
        " time",
        " timespan",
        " tools",
        " batcave",
        " utils"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9752261435fb779421331775234406e9293d41f1286dbf881d78cf24f7d5b3d9",
                "md5": "e2d4eb5febc6e1658b42654225b2a195",
                "sha256": "8862efaecf11a873785263ca891ebde1ce5fe99d38a2f69048235967f39d1b29"
            },
            "downloads": -1,
            "filename": "batutils-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e2d4eb5febc6e1658b42654225b2a195",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 59886,
            "upload_time": "2024-11-14T15:41:04",
            "upload_time_iso_8601": "2024-11-14T15:41:04.389001Z",
            "url": "https://files.pythonhosted.org/packages/97/52/261435fb779421331775234406e9293d41f1286dbf881d78cf24f7d5b3d9/batutils-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6783ddfbd8f27d395b1be6671b0c85419a01ffb71488045f957528b7846df36",
                "md5": "092fb24072ae36098c9ef962d821e952",
                "sha256": "4d48fe13be1d71408351ee85ae9490798abf4ce07b7d74ba7f9e24777af7f7f4"
            },
            "downloads": -1,
            "filename": "batutils-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "092fb24072ae36098c9ef962d821e952",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 44530,
            "upload_time": "2024-11-14T15:41:06",
            "upload_time_iso_8601": "2024-11-14T15:41:06.367034Z",
            "url": "https://files.pythonhosted.org/packages/b6/78/3ddfbd8f27d395b1be6671b0c85419a01ffb71488045f957528b7846df36/batutils-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-14 15:41:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "doddi79",
    "github_project": "batutils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "batutils"
}
        
Elapsed time: 0.41333s