realit-singer-python
Writes the Singer format from Python.
This is a fork of Singer's singer-python made for PipelineWise and Meltano
Usage
Setup environment
This library depends on python3. We recommend using a virtualenv like this:
python3 -m venv ~/.virtualenvs/singer-python
Installation
Next, install this library:
source ~/.virtualenvs/singer-python/bin/activate
git clone http://github.com/singer-io/singer-python
cd singer-python
pip install
Usage example
Now, from python code within the same virtualenv, you can use the library:
import singer
singer.write_schema('my_table',
{'properties':{'id': {'type': 'string', 'key': True}}},
['id'])
singer.write_records('my_table',
[{'id': 'b'}, {'id':'d'}])
singer.write_state({'my_table': 'd'})
Logging configuration
realit-singer-python by default doesn't use any predefined logging configuration, it's up to the calling
library to define it. However, if the environment variable LOGGING_CONF_FILE is found and set then the realit-singer-python
would use the path provided in the env variable as the logging configuration for the logger.
Singer Decimal
Enabling the use_singer_decimal = True in a tap will output decimal and floats as a string rather than their numeric representation.
Optional Setting:
A boolean setting: when enabled true in the config will outputs decimal and floating point numbers as strings to avoid loss of precision and scale.
For supporting taps, there are hints in the schema message, format = "singer.decimal", and additionalProperties scale_precision dictionary providing precision and scale. For decimal data, the target can use this
information to correctly replicate decimal data without loss. For the Floats and Number data type without precision and scale it is recommended that post processing formats the datatype based on an inspection of the data because the true data size is unknown / dynamic.
{
"use_singer_decimal": true,
}
Developer Resources
Initialize your Development Environment
pip install poetry
poetry install
Create and Run Tests
Create tests within the tests/ directory and
then run:
poetry run pytest
or
poetry run coverage run --parallel -m pytest
Continuous Integration
Run through the full suite of tests and linters by running
poetry run tox
These must pass in order for PR's to be merged.
License
Distributed under the Apache License Version 2.0
Metadata
Release files for realit-singer-python 5.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| realit_singer_python-5.0.3.tar.gz | 24.4 kB | Without provenance | Details for realit_singer_python-5.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| realit_singer_python-5.0.3-py3-none-any.whl | Python 3 | none | any | Details for realit_singer_python-5.0.3-py3-none-any.whl |
Total release size: 51.5 kB
Release files / realit_singer_python-5.0.3.tar.gz
| Download URL | realit_singer_python-5.0.3.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6bb036a9d9beb6d417bf1d3c607409fd577ae0f76ee853ed950b5574011d181
|
|
BLAKE2b-256 checksum How to use checksums |
201ae637e0ab4c6c08f32d503707ffccca759ef53f61d30bb4583e6e6fee21fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Release files / realit_singer_python-5.0.3-py3-none-any.whl
| Download URL | realit_singer_python-5.0.3-py3-none-any.whl |
|---|---|
| Size | 27.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d6d3a236b67c750d3df1294cad2e817c848f5d7df8cf57936b8297bae62fb00
|
|
BLAKE2b-256 checksum How to use checksums |
62c33076cc8bfd709256a082a93e752c121df901b59f8b8e8ab421a6bb03de41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.5
|
Security for realit-singer-python 5.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.