{"id":19732401,"url":"https://github.com/terminusdb/terminusdb-singer-target","last_synced_at":"2025-02-27T20:44:54.076Z","repository":{"id":42649635,"uuid":"394658143","full_name":"terminusdb/terminusdb-singer-target","owner":"terminusdb","description":"A Singer.io target that inject data into TerminusDB","archived":false,"fork":false,"pushed_at":"2023-02-08T02:15:00.000Z","size":40,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-10T17:54:06.325Z","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":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/terminusdb.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":"2021-08-10T13:09:21.000Z","updated_at":"2022-10-22T18:30:26.000Z","dependencies_parsed_at":"2024-11-12T00:27:56.515Z","dependency_job_id":"79912441-b150-4778-87fd-8c4577ce036c","html_url":"https://github.com/terminusdb/terminusdb-singer-target","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminusdb%2Fterminusdb-singer-target","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminusdb%2Fterminusdb-singer-target/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminusdb%2Fterminusdb-singer-target/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terminusdb%2Fterminusdb-singer-target/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terminusdb","download_url":"https://codeload.github.com/terminusdb/terminusdb-singer-target/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241058074,"owners_count":19902115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-12T00:26:14.617Z","updated_at":"2025-02-27T20:44:54.017Z","avatar_url":"https://github.com/terminusdb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# target-terminusdb\n\nThis is a [Singer](https://singer.io) target that reads JSON-formatted data\nfollowing the [Singer spec](https://github.com/singer-io/getting-started/blob/master/SPEC.md).\n\n## To install\n\n`target-terminusdb` can be install via pip with Python \u003e= 3.7:\n\n`python3 -m pip install -U target-terminusdb`\n\n## To use\n\nYou can start a project in a directory using conjunction with TerminusDB easily by:\n\n`terminusdb startproject`\n\nThis will create the config.json that stores information about the endpoint and database that you are connecting to.\n\nThen you can pipe in data using a Singer.io tap to TerminusDB. For details about how to use a Singer.io tap you can [see here](https://github.com/singer-io/getting-started/blob/master/docs/RUNNING_AND_DEVELOPING.md#running-and-developing-singer-taps-and-targets). For example you have a Python tap like this:\n\n```Python\nimport singer\nimport urllib.request\nfrom datetime import datetime, timezone\n\nnow = datetime.now(timezone.utc).isoformat(\"T\",\"milliseconds\")\nschema = {\n    'properties':   {\n        'ip': {'type': 'string'},\n        'timestamp': {'type': 'string', 'format': 'date-time'},\n    },\n}\n\nwith urllib.request.urlopen('http://icanhazip.com') as response:\n    ip = response.read().decode('utf-8').strip()\n    singer.write_schema('my_ip', schema, 'timestamp')\n    singer.write_records('my_ip', [{'timestamp': now, 'ip': ip}])\n```\n\nThen you can use it to put `my_ip` in TerminusDB like this:\n\n`python tap_ip.py | target-terminusdb -c config.json`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminusdb%2Fterminusdb-singer-target","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterminusdb%2Fterminusdb-singer-target","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminusdb%2Fterminusdb-singer-target/lists"}