Metadata-Version: 2.4
Name: tap-erpnext
Version: 0.1.0
Summary: Singer tap for ErpNext, built with the Meltano Singer SDK.
Project-URL: Source, https://github.com/adriaan90/tap-erpnext
Project-URL: Issues, https://github.com/adriaan90/tap-erpnext/issues
Author-email: Adriaan van Niekerk <kalmijnconsulting@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ELT,ErpNext
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: requests~=2.34.0
Requires-Dist: singer-sdk~=0.54.1
Requires-Dist: typing-extensions>=4.5.0; python_version < '3.13'
Provides-Extra: s3
Requires-Dist: s3fs>=2026.1.0; extra == 's3'
Description-Content-Type: text/markdown

# tap-erpnext

`tap-erpnext` is a Singer tap for ErpNext.

Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.

<!--

Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPI repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.

## Installation

Install from PyPI:

```bash
uv tool install tap-erpnext
```

Install from GitHub:

```bash
uv tool install git+https://github.com/ORG_NAME/tap-erpnext.git@main
```

-->

## Configuration

### Accepted Config Options

| Setting | Required | Default | Description |
|:--------|:--------:|:-------:|:------------|
| api_url | True | None | The base URL of the ERPNext instance (e.g. https://erp.example.com) |
| api_key | True | None | ERPNext API key |
| api_secret | True | None | ERPNext API secret |
| start_date | False | None | The earliest record date to sync |
| limit_page_length | False | 200 | Number of records to fetch per API request |
| doctypes | False | None | Specific DocType names to sync. If omitted, all accessible DocTypes are discovered. |
| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). |
| stream_maps.__else__ | False | None | Currently, only setting this to `__NULL__` is supported. This will remove all other streams. |
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
| faker_config | False | None | Config for the [`Faker`](https://faker.readthedocs.io/en/master/) instance variable `fake` used within map expressions. Only applicable if the plugin specifies `faker` as an additional dependency (through the `singer-sdk` `faker` extra or directly). |
| faker_config.seed | False | None | Value to seed the Faker generator for deterministic output: https://faker.readthedocs.io/en/master/#seeding-the-generator |
| faker_config.locale | False | None | One or more LCID locale strings to produce localized output for: https://faker.readthedocs.io/en/master/#localization |
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
| flattening_max_depth | False | None | The max depth to flatten schemas. |
| flattening_max_key_length | False | None | The maximum length of a flattened key. |
| flattening_separator | False | None | The separator to use when flattening keys. |
| batch_config | False | None | Configuration for BATCH message capabilities. |
| batch_config.encoding | False | None | Specifies the format and compression of the batch files. |
| batch_config.encoding.format | False | None | Format to use for batch files. |
| batch_config.encoding.compression | False | None | Compression format to use for batch files. |
| batch_config.storage | False | None | Defines the storage layer to use when writing batch files |
| batch_config.storage.root | False | None | Root path to use when writing batch files. |
| batch_config.storage.prefix | False | None | Prefix to use when writing batch files. |

A full list of supported settings and capabilities for this
tap is available by running:

```bash
tap-erpnext --about
```

### Configure using environment variables

This Singer tap will automatically import any environment variables within the working directory's
`.env` if the `--config=ENV` is provided, such that config values will be considered if a matching
environment variable is set either in the terminal context or in the `.env` file.

### Source Authentication and Authorization

## Usage

You can easily run `tap-erpnext` by itself or in a pipeline using [Meltano](https://meltano.com/).

### Executing the Tap Directly

```bash
tap-erpnext --version
tap-erpnext --help
tap-erpnext --config CONFIG --discover > ./catalog.json
```

## Developer Resources

Follow these instructions to contribute to this project.

### Initialize your Development Environment

Prerequisites:

- Python 3.10+
- [uv](https://docs.astral.sh/uv/)

```bash
uv sync
```

### Create and Run Tests

Create tests within the `tests` subfolder and
then run:

```bash
uv run pytest
```

You can also test the `tap-erpnext` CLI interface directly using `uv run`:

```bash
uv run tap-erpnext --help
```

### Testing with [Meltano](https://www.meltano.com)

_**Note:** This tap will work in any Singer environment and does not require Meltano.
Examples here are for convenience and to streamline end-to-end orchestration scenarios._

Use Meltano to run an EL pipeline:

```bash
# Install meltano
uv tool install meltano

# Test invocation
meltano invoke tap-erpnext --version

# Run a test EL pipeline
meltano run tap-erpnext target-jsonl
```

### SDK Dev Guide

See the [dev guide](https://sdk.meltano.com/en/latest/dev_guide.html) for more instructions on how to use the SDK to
develop your own taps and targets.
