tableschema-to-template


Nametableschema-to-template JSON
Version 0.0.13 PyPI version JSON
download
home_pagehttps://github.com/hubmapconsortium/tableschema-to-template
SummaryGiven a Frictionless Table Schema, generates an Excel template with input validation
upload_time2023-02-01 21:53:17
maintainer
docs_urlNone
authorChuck McCallum
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # tableschema-to-template

Given a [Frictionless Table Schema](https://specs.frictionlessdata.io/table-schema/)
(like [this](https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/schema.yaml)),
generate an Excel template with input validation
(like [this](https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/template.xlsx)).

## Usage

Download a [sample `schema.yaml`](https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/schema.yaml), and then:

```sh
pip install tableschema-to-template
ts2xl.py schema.yaml template.xlsx
# Open with Excel:
open template.xlsx
```

Or to use inside Python:
```python
from tableschema_to_template import create_xlsx
schema = {'fields': [{
  'name': 'a_number',
  'description': 'A number!',
  'type': 'number'
}]}
create_xlsx(schema, '/tmp/template.xlsx')
```

Additional docs:
- [For CLI users](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/README-cli.md#readme)
- [For Python users](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/README-py.md#readme)
- [For project developers](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/README-dev.md#readme)

## Features

- Enum constraints transformed into pull-downs.
- Field descriptions transformed into comments in header.
- Float, integer, and boolean type validation, with range checks on numbers.

More details in the [changelog](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/CHANGELOG.md#readme).

## Related work

If you want to construct Excel files programmatically, [XlsxWriter](https://xlsxwriter.readthedocs.io/) is great!

For validated data entry, from the Frictionless community:
- [`table-schema-resource-template`](https://pypi.org/project/table-schema-resource-template/): Generates templates, but doesn't go beyond row headers. 
- [`data-curator`](https://github.com/qcif/data-curator): Desktop application for data entry based on Table Schema.
- [`csv-gg`](https://github.com/etalab/csv-gg): Web app which serves data entry form, and uses [Validata API](https://git.opendatafrance.net/validata/) for validation. 

From the biomedical ontologies community:
- [`CEDAR`](https://more.metadatacenter.org/): Data entry tool based on ontologies.
- [`Webulous`](https://www.ebi.ac.uk/spot/webulous/): Google sheets plugin that adds pulldowns based on ontology terms.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hubmapconsortium/tableschema-to-template",
    "name": "tableschema-to-template",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Chuck McCallum",
    "author_email": "mccallucc+tableschema@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/23/2d/5b5c0127e959a715c5365b3b491846fba5bc1fb7f94370cc3a4fb3f51f68/tableschema-to-template-0.0.13.tar.gz",
    "platform": null,
    "description": "# tableschema-to-template\n\nGiven a [Frictionless Table Schema](https://specs.frictionlessdata.io/table-schema/)\n(like [this](https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/schema.yaml)),\ngenerate an Excel template with input validation\n(like [this](https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/template.xlsx)).\n\n## Usage\n\nDownload a [sample `schema.yaml`](https://raw.githubusercontent.com/hubmapconsortium/tableschema-to-template/main/tests/fixtures/schema.yaml), and then:\n\n```sh\npip install tableschema-to-template\nts2xl.py schema.yaml template.xlsx\n# Open with Excel:\nopen template.xlsx\n```\n\nOr to use inside Python:\n```python\nfrom tableschema_to_template import create_xlsx\nschema = {'fields': [{\n  'name': 'a_number',\n  'description': 'A number!',\n  'type': 'number'\n}]}\ncreate_xlsx(schema, '/tmp/template.xlsx')\n```\n\nAdditional docs:\n- [For CLI users](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/README-cli.md#readme)\n- [For Python users](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/README-py.md#readme)\n- [For project developers](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/README-dev.md#readme)\n\n## Features\n\n- Enum constraints transformed into pull-downs.\n- Field descriptions transformed into comments in header.\n- Float, integer, and boolean type validation, with range checks on numbers.\n\nMore details in the [changelog](https://github.com/hubmapconsortium/tableschema-to-template/blob/main/CHANGELOG.md#readme).\n\n## Related work\n\nIf you want to construct Excel files programmatically, [XlsxWriter](https://xlsxwriter.readthedocs.io/) is great!\n\nFor validated data entry, from the Frictionless community:\n- [`table-schema-resource-template`](https://pypi.org/project/table-schema-resource-template/): Generates templates, but doesn't go beyond row headers. \n- [`data-curator`](https://github.com/qcif/data-curator): Desktop application for data entry based on Table Schema.\n- [`csv-gg`](https://github.com/etalab/csv-gg): Web app which serves data entry form, and uses [Validata API](https://git.opendatafrance.net/validata/) for validation. \n\nFrom the biomedical ontologies community:\n- [`CEDAR`](https://more.metadatacenter.org/): Data entry tool based on ontologies.\n- [`Webulous`](https://www.ebi.ac.uk/spot/webulous/): Google sheets plugin that adds pulldowns based on ontology terms.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Given a Frictionless Table Schema, generates an Excel template with input validation",
    "version": "0.0.13",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f7f3c129377d9b815c0bb92b8c24bbecabe5e6b13b831f38924f80d2e5b40b2",
                "md5": "f9de65d06bdb353c8889718acf9f4a27",
                "sha256": "4905500a4235740654230c3223629d26fdccb7a0457ec1d0110ea102c4f1146c"
            },
            "downloads": -1,
            "filename": "tableschema_to_template-0.0.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f9de65d06bdb353c8889718acf9f4a27",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14860,
            "upload_time": "2023-02-01T21:53:16",
            "upload_time_iso_8601": "2023-02-01T21:53:16.020393Z",
            "url": "https://files.pythonhosted.org/packages/9f/7f/3c129377d9b815c0bb92b8c24bbecabe5e6b13b831f38924f80d2e5b40b2/tableschema_to_template-0.0.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "232d5b5c0127e959a715c5365b3b491846fba5bc1fb7f94370cc3a4fb3f51f68",
                "md5": "862c6903d84b866f9410d176c8735dba",
                "sha256": "2d8d2250efb840e0ecb9012c5e879a82ef68f65dd86bdff574200fdfc978ff1c"
            },
            "downloads": -1,
            "filename": "tableschema-to-template-0.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "862c6903d84b866f9410d176c8735dba",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13564,
            "upload_time": "2023-02-01T21:53:17",
            "upload_time_iso_8601": "2023-02-01T21:53:17.238399Z",
            "url": "https://files.pythonhosted.org/packages/23/2d/5b5c0127e959a715c5365b3b491846fba5bc1fb7f94370cc3a4fb3f51f68/tableschema-to-template-0.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-01 21:53:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hubmapconsortium",
    "github_project": "tableschema-to-template",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "tableschema-to-template"
}
        
Elapsed time: 0.03609s