ticdat


Nameticdat JSON
Version 0.2.24 PyPI version JSON
download
home_pagehttps://github.com/ticdat/ticdat/
Summary
upload_time2023-08-28 02:39:24
maintainer
docs_urlNone
authorPete Cacioppi
requires_python
licenseBSD 2-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ticdat

Go [here](https://github.com/ticdat/ticdat/wiki/ticdat-status) for project status and installation
instructions. Go [here](https://ticdat.github.io/ticdat/) for documentation.

`ticdat` is a Python package that provides lightweight, ORM style functionality around either a dict-of-dicts or
`pandas.DataFrame` representation of tables. It is well suited for defining and validating the input data for complex
solve engines (i.e. optimization and scheduling-type problems).

`ticdat` functionality is organized around two classes - `TicDatFactory` and `PanDatFactory`. Both classes define a
simple database style schema on construction. Data integrity rules can then be added in the form of foreign key
relationships, data field types (to include numerical ranges and allowed strings) and row predicates
(functions that check if a given row violates a particular data condition).  The factory classes can then be used to
construct `TicDat`/`PanDat` objects that contain tables consistent with the defined schema. By design,
`ticdat`, allows these data objects to violate the data integrity rules while providing convenient bulk query functions
to determine where those violations occur.

`TicDat` objects (created by a `TicDatFactory`) contain tables in a dict-of-dict format. The outer dictionary maps
primary key values to data rows. The inner dictionaries are data rows indexed by field names (similar to
`csv.DictReader/csv.DictWriter`). Tables that do not have primary keys are rendered as a list of data row dictionaries.

`PanDat` objects (created by `PanDatFactory`) render tables as `pandas.DataFrame` objects. The columns in each
`DataFrame` will contain all of the primary key and data fields that were defined in the `PanDatFactory` schema. The
`PanDatFactory` code can be thought of as implementing a shim library that organizes `DataFrame` objects into a
predefined schema, and facilitates rich integrity checks based on schema defined rules.

The `ticdat` example library is focused on two patterns for building optimization engines - using `TicDatFactory` in
conjunction with `gurobipy` and using `PanDatFactory` in conjunction with `amplpy`. That said, `ticdat` can also be
used with libraries like `pyomo`, `pulp`, `docplex` and `xpress`. It also has functionality to support the OPL and
LINGO modeling languages, although the AMPL support is far more mature.

`ticdat` is also useful for machine-learning applications. In this case, one typically uses `PanDatFactory` to 
provide ORM-like functionality on top of `pandas`, as well as to simplify the munging of time stamp data and 
text columns that contain exclusively numbers. 

The `ticdat` library is distributed under the BSD2 open source license.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ticdat/ticdat/",
    "name": "ticdat",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "12samn@gmail.com",
    "keywords": "",
    "author": "Pete Cacioppi",
    "author_email": "peter.cacioppi@gmail.com",
    "download_url": "",
    "platform": "any",
    "description": "# ticdat\n\nGo [here](https://github.com/ticdat/ticdat/wiki/ticdat-status) for project status and installation\ninstructions. Go [here](https://ticdat.github.io/ticdat/) for documentation.\n\n`ticdat` is a Python package that provides lightweight, ORM style functionality around either a dict-of-dicts or\n`pandas.DataFrame` representation of tables. It is well suited for defining and validating the input data for complex\nsolve engines (i.e. optimization and scheduling-type problems).\n\n`ticdat` functionality is organized around two classes - `TicDatFactory` and `PanDatFactory`. Both classes define a\nsimple database style schema on construction. Data integrity rules can then be added in the form of foreign key\nrelationships, data field types (to include numerical ranges and allowed strings) and row predicates\n(functions that check if a given row violates a particular data condition).  The factory classes can then be used to\nconstruct `TicDat`/`PanDat` objects that contain tables consistent with the defined schema. By design,\n`ticdat`, allows these data objects to violate the data integrity rules while providing convenient bulk query functions\nto determine where those violations occur.\n\n`TicDat` objects (created by a `TicDatFactory`) contain tables in a dict-of-dict format. The outer dictionary maps\nprimary key values to data rows. The inner dictionaries are data rows indexed by field names (similar to\n`csv.DictReader/csv.DictWriter`). Tables that do not have primary keys are rendered as a list of data row dictionaries.\n\n`PanDat` objects (created by `PanDatFactory`) render tables as `pandas.DataFrame` objects. The columns in each\n`DataFrame` will contain all of the primary key and data fields that were defined in the `PanDatFactory` schema. The\n`PanDatFactory` code can be thought of as implementing a shim library that organizes `DataFrame` objects into a\npredefined schema, and facilitates rich integrity checks based on schema defined rules.\n\nThe `ticdat` example library is focused on two patterns for building optimization engines - using `TicDatFactory` in\nconjunction with `gurobipy` and using `PanDatFactory` in conjunction with `amplpy`. That said, `ticdat` can also be\nused with libraries like `pyomo`, `pulp`, `docplex` and `xpress`. It also has functionality to support the OPL and\nLINGO modeling languages, although the AMPL support is far more mature.\n\n`ticdat` is also useful for machine-learning applications. In this case, one typically uses `PanDatFactory` to \nprovide ORM-like functionality on top of `pandas`, as well as to simplify the munging of time stamp data and \ntext columns that contain exclusively numbers. \n\nThe `ticdat` library is distributed under the BSD2 open source license.\n",
    "bugtrack_url": null,
    "license": "BSD 2-Clause",
    "summary": "",
    "version": "0.2.24",
    "project_urls": {
        "Homepage": "https://github.com/ticdat/ticdat/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ec40e64413590f77b0c1ee3e38e58b5136601f3ef2d6e2d7ca901989030c2c3",
                "md5": "cbe46ebd002091d3b4df29895ad3d8b8",
                "sha256": "76f2565dcdd67d7e6542a63c84cde8c41211aad7c758ff69e15186ab72820bab"
            },
            "downloads": -1,
            "filename": "ticdat-0.2.24-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cbe46ebd002091d3b4df29895ad3d8b8",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 218363,
            "upload_time": "2023-08-28T02:39:24",
            "upload_time_iso_8601": "2023-08-28T02:39:24.199799Z",
            "url": "https://files.pythonhosted.org/packages/7e/c4/0e64413590f77b0c1ee3e38e58b5136601f3ef2d6e2d7ca901989030c2c3/ticdat-0.2.24-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-28 02:39:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ticdat",
    "github_project": "ticdat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ticdat"
}
        
Elapsed time: 0.10430s