PGCopy bynary dump parser.
Project description
pgcopylib
Library for reading data from binary format PosgreSQL
Features
- No dependencies on external libraries
- Without specifying data types, all columns will be read in bytes
- Support for most data types
Supported Data Types
| PostgreSQL data type | Python data type |
|---|---|
| _bit | list[str] |
| _bool | list[bool] |
| _box | list[tuple[tuple[float, float], tuple[float, float]]] |
| _bpchar | list[str] |
| _bytea | list[bytes] |
| _char | list[str] |
| _cidr | list[ipaddress.IPv4Network / ipaddress.IPv6Network] |
| _circle | list[tuple[float, float, float]] |
| _date | list[datetime.date] |
| _float4 | list[float] |
| _float8 | list[float] |
| _inet | list[ipaddress.IPv4Address / ipaddress.IPv6Address] |
| _int2 | list[int] |
| _int4 | list[int] |
| _int8 | list[int] |
| _interval | list[dateutil.relativedelta.relativedelta] |
| _json | list[dict / list / str / int / float / bool / None] |
| _jsonb | list[dict / list / str / int / float / bool / None] |
| _line | list[tuple[float, float, float]] |
| _lseg | list[list[tuple[float, float]]] |
| _macaddr | list[str] |
| _macaddr8 | list[str] |
| _money | list[float] |
| _numeric | list[decimal.Decimal] |
| _oid | list[int] |
| _path | list[list[tuple[float, float]] / tuple[tuple[float, float]]] |
| _point | list[tuple[float, float]] |
| _polygon | list[tuple[tuple[float, float]]] |
| _serial2 | list[int] |
| _serial4 | list[int] |
| _serial8 | list[int] |
| _text | list[str] |
| _time | list[datetime.time] |
| _timestamp | list[datetime.datetime] |
| _timestamptz | list[datetime.datetime] |
| _timetz | list[datetime.time] |
| _uuid | list[uuid.UUID] |
| _varbit | list[str] |
| _varchar | list[str] |
| _xml | list[str] |
| bit | str |
| bool | bool |
| box | tuple[tuple[float, float], tuple[float, float]] |
| bpchar | str |
| bytea | bytes |
| char | str |
| cidr | ipaddress.IPv4Network / ipaddress.IPv6Network |
| circle | tuple[float, float, float] |
| date | datetime.date |
| float4 | float |
| float8 | float |
| inet | ipaddress.IPv4Address / ipaddress.IPv6Address |
| int2 | int |
| int4 | int |
| int8 | int |
| interval | dateutil.relativedelta.relativedelta |
| json | dict / list / str / int / float / bool / None |
| jsonb | dict / list / str / int / float / bool / None |
| line | tuple[float, float, float] |
| lseg | list[tuple[float, float]] |
| macaddr | str |
| macaddr8 | str |
| money | float |
| numeric | decimal.Decimal |
| oid | int |
| path | list[tuple[float, float]] / tuple[tuple[float, float]] |
| point | tuple[float, float] |
| polygon | tuple[tuple[float, float]] |
| serial2 | int |
| serial4 | int |
| serial8 | int |
| text | str |
| time | datetime.time |
| timestamp | datetime.datetime |
| timestamptz | datetime.datetime |
| timetz | datetime.time |
| uuid | uuid.UUID |
| varbit | str |
| varchar | str |
| xml | str |
Installation
From pip
pip install pgcopylib
From local directory
pip install .
From git
pip install git+https://github.com/0xMihalich/pgcopylib
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pgcopylib-0.2.1.3.tar.gz
(16.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pgcopylib-0.2.1.3.tar.gz.
File metadata
- Download URL: pgcopylib-0.2.1.3.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d28256352dde370244b57fe9efe12874b92aebd50b2cef3d3002870566c96781
|
|
| MD5 |
58f27d65e3edda9525b7d9a0a15dd12e
|
|
| BLAKE2b-256 |
d2d7e0142a8dac3462754b2c8f195cb67078ed31a0f0e9892d55941de2543736
|
File details
Details for the file pgcopylib-0.2.1.3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: pgcopylib-0.2.1.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 314.8 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
819ff89ab62210c2f099db7df931b2f0238b894907ac38cb64c0f32328346620
|
|
| MD5 |
dcda572430c6786b25ea6a0e4b85f351
|
|
| BLAKE2b-256 |
f4f48eeb1d346aebf4a35dbbcba21da7fdd2855dc5ff6099a47e7172e5ed481b
|