Metadata-Version: 2.4
Name: url2pg
Version: 0.1.0
Summary: This repository ingests data from a CSV/Parquet url into a Postgres table overwriting the previous table if it exists.
Author-email: Cesar Cardoso <hello@cesarcardoso.cc>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pandas>=2.3.3
Requires-Dist: psycopg2-binary>=2.9.11
Requires-Dist: pyarrow>=22.0.0
Requires-Dist: sqlalchemy>=2.0.45

# url2pg - v0.1.0

This repository ingests data from a CSV/Parquet url into a Postgres table
overwriting the previous table if it exists.

Installation
```shell
uv add url2pg
```
or
```shell
pip install url2pg
```
Usage:
```shell
url2pg \
    --user=<postgres_user:default=root> \
    --password=<postgres_password:default=root> \
    --host=<postgres_host:default=localhost> \
    --port=<postgres_port:default=5432> \
    --db=<*_db> \
    --table_name=<*_destiny_table> \
    --url_file=<*_source_url>
```

You can use as a Docker image as well:
```shell
docker run -it \
    --network=<*_destiny_network> \
    cesarbouli/url2pg \
    --user=<postgres_user:default=root> \
    --password=<postgres_password:default=root> \
    --host=<postgres_host:default=localhost> \
    --port=<postgres_port:default=5432> \
    --db=<*_db> \
    --table_name=<*_destiny_table> \
    --url_file=<*_source_url>
```

In your docker compose file:
```yaml
services:
  ingestion-data:
    image: cesarbouli/url2pg
    command: --db=<_db_> (...)
    (...)
```
Docker image: [https://hub.docker.com/r/cesarbouli/url2pg](https://hub.docker.com/r/cesarbouli/url2pg) \
