mars-dtc


Namemars-dtc JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryIntegrated Martian datetime and calendar support for Python
upload_time2025-10-07 04:15:39
maintainerNone
docs_urlNone
authorVictor De Lima
requires_python>=3.9
licenseMIT
keywords mars datetime pandas matplotlib astronomy
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mars-dtc: Integrated Mars Datetime and Calendar Support for Python.

[![PyPI version](https://badge.fury.io/py/mars-dtc.svg)](https://pypi.org/project/mars-dtc/)

![](demo/mars_ground_temperature.png)

`mars-dtc` is a Python library for representing and manipulating Martian dates and times. 

This initial release implements the Darian calendar, which divides the Martian year into 24 months and accounts for leap sols. Future versions may include other proposed Martian calendar systems.

The library offers familiar functionality similar to Python’s `datetime` module. It integrates seamlessly with Pandas and Matplotlib, enabling analysis, visualization, and serialization of Martian temporal data.


## Installation

```bash
pip install mars-dtc
```


## Features

- Full implementation of the Darian calendar (24 months, 668–669 sols per year) in this initial relase.
- Core date and time classes:
  - `MarsDate` for calendar dates
  - `MarsDateTime` for date–time precision
  - `MarsTimedelta` for sol-based time deltas
- Arithmetic, comparisons, and rounding operations
- Serialization to and from JSON, YAML, and dictionaries
- Custom Pandas extension dtype for native column and Series support
- Integration with Matplotlib for native plotting
- Utilities for generating Martian date ranges and computing week or sol-of-year values

For the full set of features, see the [demo notebook](demo/demo.ipynb) included, showing:

- Basic date and time creation
- Arithmetic and formatting
- JSON/YAML serialization
- Pandas operations
- Plotting with Matplotlib

Alongside the demo, we include an example dataset of parsed Martian weather data with Darian calendar dates to allows users to test the package’s functionality.


## Citing mars-dtc

If you use `mars-dtc` in your publication, please cite it by using the following BibTeX entry.


```bibtex
@software{De_Lima_mars-dtc_Integrated_Mars_2025,
	author = {De Lima, Victor},
	month = oct,
	title = {{mars-dtc: Integrated Mars Datetime and Calendar Support for Python}},
	url = {https://purl.org/victordelima/mars-dtc},
	year = {2025}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mars-dtc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mars, datetime, pandas, matplotlib, astronomy",
    "author": "Victor De Lima",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c2/80/278e5ea139cbfa7da2ac52232931ede070f0a8b5d4569810b39e57bd79aa/mars_dtc-0.1.3.tar.gz",
    "platform": null,
    "description": "# mars-dtc: Integrated Mars Datetime and Calendar Support for Python.\n\n[![PyPI version](https://badge.fury.io/py/mars-dtc.svg)](https://pypi.org/project/mars-dtc/)\n\n![](demo/mars_ground_temperature.png)\n\n`mars-dtc` is a Python library for representing and manipulating Martian dates and times. \n\nThis initial release implements the Darian calendar, which divides the Martian year into 24 months and accounts for leap sols. Future versions may include other proposed Martian calendar systems.\n\nThe library offers familiar functionality similar to Python\u2019s `datetime` module. It integrates seamlessly with Pandas and Matplotlib, enabling analysis, visualization, and serialization of Martian temporal data.\n\n\n## Installation\n\n```bash\npip install mars-dtc\n```\n\n\n## Features\n\n- Full implementation of the Darian calendar (24 months, 668\u2013669 sols per year) in this initial relase.\n- Core date and time classes:\n  - `MarsDate` for calendar dates\n  - `MarsDateTime` for date\u2013time precision\n  - `MarsTimedelta` for sol-based time deltas\n- Arithmetic, comparisons, and rounding operations\n- Serialization to and from JSON, YAML, and dictionaries\n- Custom Pandas extension dtype for native column and Series support\n- Integration with Matplotlib for native plotting\n- Utilities for generating Martian date ranges and computing week or sol-of-year values\n\nFor the full set of features, see the [demo notebook](demo/demo.ipynb) included, showing:\n\n- Basic date and time creation\n- Arithmetic and formatting\n- JSON/YAML serialization\n- Pandas operations\n- Plotting with Matplotlib\n\nAlongside the demo, we include an example dataset of parsed Martian weather data with Darian calendar dates to allows users to test the package\u2019s functionality.\n\n\n## Citing mars-dtc\n\nIf you use `mars-dtc` in your publication, please cite it by using the following BibTeX entry.\n\n\n```bibtex\n@software{De_Lima_mars-dtc_Integrated_Mars_2025,\n\tauthor = {De Lima, Victor},\n\tmonth = oct,\n\ttitle = {{mars-dtc: Integrated Mars Datetime and Calendar Support for Python}},\n\turl = {https://purl.org/victordelima/mars-dtc},\n\tyear = {2025}\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Integrated Martian datetime and calendar support for Python",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://www.victordelima.com/mars-dtc/",
        "Repository": "https://purl.org/victordelima/mars-dtc"
    },
    "split_keywords": [
        "mars",
        " datetime",
        " pandas",
        " matplotlib",
        " astronomy"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1814bd7d311c2ceca069f3400bedcb6a3b144ac3149cb24a616b0afbf28ee28f",
                "md5": "9b6f96624c532b558cb96bf13e4b0f1e",
                "sha256": "e4518d2176b451d3f1cd2c2a96eb7456697fdc7ee55092eb23ae207bca328503"
            },
            "downloads": -1,
            "filename": "mars_dtc-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b6f96624c532b558cb96bf13e4b0f1e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 14044,
            "upload_time": "2025-10-07T04:15:36",
            "upload_time_iso_8601": "2025-10-07T04:15:36.604776Z",
            "url": "https://files.pythonhosted.org/packages/18/14/bd7d311c2ceca069f3400bedcb6a3b144ac3149cb24a616b0afbf28ee28f/mars_dtc-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c280278e5ea139cbfa7da2ac52232931ede070f0a8b5d4569810b39e57bd79aa",
                "md5": "e19f3a4a159f632d4a6c3a7c5eb57513",
                "sha256": "e75488fb2a1475305a8833b36fed7e74b86f235cacdc0650e553be792f472ccb"
            },
            "downloads": -1,
            "filename": "mars_dtc-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "e19f3a4a159f632d4a6c3a7c5eb57513",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 18508,
            "upload_time": "2025-10-07T04:15:39",
            "upload_time_iso_8601": "2025-10-07T04:15:39.174364Z",
            "url": "https://files.pythonhosted.org/packages/c2/80/278e5ea139cbfa7da2ac52232931ede070f0a8b5d4569810b39e57bd79aa/mars_dtc-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 04:15:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mars-dtc"
}
        
Elapsed time: 0.72102s