target-terminusdb
This is a Singer target that reads JSON-formatted data following the Singer spec.
To install
target-terminusdb can be install via pip with Python >= 3.7:
python3 -m pip install -U target-terminusdb
To use
You can start a project in a directory using conjunction with TerminusDB easily by:
terminusdb startproject
This will create the config.json that stores information about the endpoint and database that you are connecting to.
Then 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. For example you have a Python tap like this:
import singer
import urllib.request
from datetime import datetime, timezone
now = datetime.now(timezone.utc).isoformat("T","milliseconds")
schema = {
'properties': {
'ip': {'type': 'string'},
'timestamp': {'type': 'string', 'format': 'date-time'},
},
}
with urllib.request.urlopen('http://icanhazip.com') as response:
ip = response.read().decode('utf-8').strip()
singer.write_schema('my_ip', schema, 'timestamp')
singer.write_records('my_ip', [{'timestamp': now, 'ip': ip}])
Then you can use it to put my_ip in TerminusDB like this:
python tap_ip.py | target-terminusdb -c config.json
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file target-terminusdb-0.1.4.tar.gz.
File metadata
- Download URL: target-terminusdb-0.1.4.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f203eab556e51f126434f0eef4b50b4d770a7ad9f82ad073876c21aa2e925aca
|
|
| MD5 |
a643f68c0ec4103ce8b607fd34fc34bd
|
|
| BLAKE2b-256 |
58b75e4104f10f90a6ded3b13946c6279c1da86f76345a314674d07ef08fec3c
|