{"id":20508362,"url":"https://github.com/citrineinformatics/citrine-python-converter-template","last_synced_at":"2026-05-29T12:31:43.326Z","repository":{"id":149683420,"uuid":"84952540","full_name":"CitrineInformatics/citrine-python-converter-template","owner":"CitrineInformatics","description":"Converter template for python","archived":false,"fork":false,"pushed_at":"2017-09-07T22:12:52.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-12T22:37:47.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CitrineInformatics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-14T13:31:37.000Z","updated_at":"2019-06-09T08:54:37.000Z","dependencies_parsed_at":"2023-04-26T02:17:54.750Z","dependency_job_id":null,"html_url":"https://github.com/CitrineInformatics/citrine-python-converter-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CitrineInformatics/citrine-python-converter-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcitrine-python-converter-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcitrine-python-converter-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcitrine-python-converter-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcitrine-python-converter-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CitrineInformatics","download_url":"https://codeload.github.com/CitrineInformatics/citrine-python-converter-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CitrineInformatics%2Fcitrine-python-converter-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33652979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:18:16.874Z","updated_at":"2026-05-29T12:31:43.309Z","avatar_url":"https://github.com/CitrineInformatics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# citrine-python-converter-template\n\nThis is a template for defining Citrination-compatible converters in python.\nThese converters can be hosted on Citrination as an \"ingester\" or run through the [pif-ingestor](https://github.com/CitrineInformatics/pif-ingestor) CLI driver.\nThis is accomplished by defining an extension with a `convert` method is loaded and executed by drivers on Citrination or locally.\n\n\n## Usage\n\nThis converter is in the form of a dummy example.\nTo use it, you'll need to edit some of the files.\nThere are no templating magicks (at this point).\nLet's just go through the files:\n\n### `super_fun_converter`\n\nThis directory name is the name of the converter package.\nIts good practice to pick a descriptive name, but anything will do.\nThis should also be the name of your repository.\nIt is helpful (but not strictly required) if the name doesn't conflict with any existing packages on [PyPI](https://pypi.python.org/pypi).\n\nThis directory contains the converter\n\n### `my_module.py`\n\nThis is a example module that contains a convert method.\nYou can change the name of the module by renaming the file.\nJust be sure it contains a `convert` method that takes keyword arguments.\n\n### `description.yaml`\n\nThis file contains a description of the converter that is used when constructing a UI for it.\nThe main block is a list of arguments, giving their name and type along with a description of the argument\nand whether it is required or optional.\nThe example file contains additional information about specifying types.\n\n### `setup.py`\n\nThis file describes your converter package.\nChange the `name` to whatever you renamed `super_fun_converter` to above.\nAlso, change the `url` to point to your repository or website.\nThe `author` and `author_email` fields are optional, but suggested.\n`install_requires` should list the external packages your converter uses without version numbers.\nFinally, change the `super_fun = ...` line in `entry_points` to name your converter and point to its location.\nFor example, if you wanted to call the converter `qbox` and it was located in the `qbox_converter` module of `hutch_qbox_converter`\nthen `entry_points` would read:\n```\nentry_points={\n    'citrine.dice.converter': [\n        'qbox = hutch_qbox_converter.qbox_converter',\n    ],\n}\n```\n\n### `requirements.txt`\n\nThis file lists all of the python packages needed to run the converter with exact version numbers.\nThey are automatically installed.\n\n\n## `convert()` method\n\nwhat we've just done is define an `extension` that can be used in Citrination's data ingest pipeline\nand [command line ingestor](https://github.com/CitrineInformatics/pif-ingestor).\nThe extension is used by calling a method called `convert` with [keyword arguments](https://docs.python.org/3.6/glossary.html#term-argument).\nThere will always be a keyword argument `files` that is a list of strings.\nThese are the files that are to be converted into a [PIF](http://citrineinformatics.github.io/pif-documentation/).\n`convert` should return either a PIF or a list of PIFs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitrineinformatics%2Fcitrine-python-converter-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitrineinformatics%2Fcitrine-python-converter-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitrineinformatics%2Fcitrine-python-converter-template/lists"}