tsenum


Nametsenum JSON
Version 1.2.0 PyPI version JSON
download
home_page
SummaryTimestamp enumerator
upload_time2023-09-26 15:12:08
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords enumerator timestamp tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tsenum

[![Tests](https://github.com/aboehm/tsenum/actions/workflows/tests.yml/badge.svg)](https://github.com/aboehm/tsenum/actions/workflows/tests.yml)

A timestamp generator.

## Install

You can use pip to install from the repository

```
pip install tsenum
```

or download sources and run pip from this directory

```
git clone https://github.com/aboehm/tsenum
pip install .
```

## Usage

`tsenum` provides an CLI. For help run:

```
tsenum -h
```

To count 7 days back from yesterday via CLI, run:

```sh
tsenum --offset -1 --count -7 --step day --pattern "%Y-%m-%d: Hello world!"
2016-05-27: Hello world!
2016-05-28: Hello world!
2016-05-29: Hello world!
2016-05-30: Hello world!
2016-05-31: Hello world!
2016-06-01: Hello world!
2016-06-02: Hello world!
```

To do it programmatically:

```python
from datetime import datetime
import tsenum

print(
    tsenum.enumerate_times(
        datetime.now().astimezone(),
        offset=-1,
        count=-7,
        step=tsenum.Step.DAY,
        pattern='%Y-%m-%d'
    )
)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tsenum",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "enumerator,timestamp,tool",
    "author": "",
    "author_email": "Alexander B\u00f6hm <alexander.boehm@malbolge.net>",
    "download_url": "https://files.pythonhosted.org/packages/4e/a8/af8bbce03fe151992ff5256f1d5f3407ae31318166b8ebd3b3637c54ad8a/tsenum-1.2.0.tar.gz",
    "platform": null,
    "description": "# tsenum\n\n[![Tests](https://github.com/aboehm/tsenum/actions/workflows/tests.yml/badge.svg)](https://github.com/aboehm/tsenum/actions/workflows/tests.yml)\n\nA timestamp generator.\n\n## Install\n\nYou can use pip to install from the repository\n\n```\npip install tsenum\n```\n\nor download sources and run pip from this directory\n\n```\ngit clone https://github.com/aboehm/tsenum\npip install .\n```\n\n## Usage\n\n`tsenum` provides an CLI. For help run:\n\n```\ntsenum -h\n```\n\nTo count 7 days back from yesterday via CLI, run:\n\n```sh\ntsenum --offset -1 --count -7 --step day --pattern \"%Y-%m-%d: Hello world!\"\n2016-05-27: Hello world!\n2016-05-28: Hello world!\n2016-05-29: Hello world!\n2016-05-30: Hello world!\n2016-05-31: Hello world!\n2016-06-01: Hello world!\n2016-06-02: Hello world!\n```\n\nTo do it programmatically:\n\n```python\nfrom datetime import datetime\nimport tsenum\n\nprint(\n    tsenum.enumerate_times(\n        datetime.now().astimezone(),\n        offset=-1,\n        count=-7,\n        step=tsenum.Step.DAY,\n        pattern='%Y-%m-%d'\n    )\n)\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Timestamp enumerator",
    "version": "1.2.0",
    "project_urls": {
        "Documentation": "https://github.com/aboehm/tsenum#readme",
        "Issues": "https://github.com/aboehm/tsenum/issues",
        "Source": "https://github.com/aboehm/tsenum"
    },
    "split_keywords": [
        "enumerator",
        "timestamp",
        "tool"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4f48d5ab64806076b46f9b40a19838f3325545f440c86ee8992b425491a1184",
                "md5": "ed6bae9c30a5c097166ba58787fed9ca",
                "sha256": "1eb410016f1f2eb4e6a06cd14ddcd7f86bd3fd56a3dca1faaa2fe3f9d5b2b98f"
            },
            "downloads": -1,
            "filename": "tsenum-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ed6bae9c30a5c097166ba58787fed9ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10614,
            "upload_time": "2023-09-26T15:12:07",
            "upload_time_iso_8601": "2023-09-26T15:12:07.448526Z",
            "url": "https://files.pythonhosted.org/packages/d4/f4/8d5ab64806076b46f9b40a19838f3325545f440c86ee8992b425491a1184/tsenum-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4ea8af8bbce03fe151992ff5256f1d5f3407ae31318166b8ebd3b3637c54ad8a",
                "md5": "7cbb78b815ea897a46bb0893e8e29af3",
                "sha256": "2ce07a32c25414dc670b22fbd135bd25ee2d575e40eeb774e6e7374527b9e13a"
            },
            "downloads": -1,
            "filename": "tsenum-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7cbb78b815ea897a46bb0893e8e29af3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12026,
            "upload_time": "2023-09-26T15:12:08",
            "upload_time_iso_8601": "2023-09-26T15:12:08.998655Z",
            "url": "https://files.pythonhosted.org/packages/4e/a8/af8bbce03fe151992ff5256f1d5f3407ae31318166b8ebd3b3637c54ad8a/tsenum-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-26 15:12:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aboehm",
    "github_project": "tsenum#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tsenum"
}
        
Elapsed time: 0.11701s