Name | abraxos JSON |
Version |
0.0.5
JSON |
| download |
home_page | None |
Summary | Upgrade you Pandas ETL process. |
upload_time | 2025-02-18 00:37:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License |
keywords |
etl
validation
sql
csv
pandas
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# abraxos
**abraxos** is a Python package for efficient data transformation, validation, and database interaction. It provides utilities to handle CSV processing, SQL insertions, DataFrame transformations, and Pydantic-based validation with error tracking.
## Features
- **CSV Processing**: Read CSV files with error handling and chunking support.
- **SQL Integration**: Insert DataFrames into SQL databases with automatic error handling and retry logic.
- **Data Transformation**: Apply transformations to DataFrames while managing errors.
- **Pydantic Validation**: Validate DataFrame records using Pydantic models, separating valid and invalid rows.
## Installation
```bash
pip install abraxos
```
## Usage
### Reading CSV Files
```python
from abraxos import read_csv
bad_lines, df = read_csv("data.csv")
print("Bad lines:", bad_lines)
print(df.head())
```
### Writing Data to SQL
```python
from abraxos import to_sql
result = to_sql(df, "table_name", connection)
print("Errors:", result.errors)
print("Successful Inserts:", result.success_df.shape[0])
```
### Data Transformation
```python
from abraxos import transform
def clean_data(df):
df["column"] = df["column"].str.lower()
return df
result = transform(df, clean_data)
print("Errors:", result.errors)
print("Transformed Data:", result.success_df.head())
```
### Data Validation
```python
from abraxos import validate
from pydantic import BaseModel
class MyModel(BaseModel):
column: str
result = validate(df, MyModel())
print("Errors:", result.errors)
print("Valid Data:", result.success_df.head())
```
## License
MIT License
## Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.
## Author
Developed by Odos Matthews
Raw data
{
"_id": null,
"home_page": null,
"name": "abraxos",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "etl, validation, sql, csv, pandas",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e2/67/087b97ed14e278701fe0ec30d4142684b4ef37e0b487f76b68bbd7333f0d/abraxos-0.0.5.tar.gz",
"platform": null,
"description": "# abraxos\n\n**abraxos** is a Python package for efficient data transformation, validation, and database interaction. It provides utilities to handle CSV processing, SQL insertions, DataFrame transformations, and Pydantic-based validation with error tracking.\n\n## Features\n- **CSV Processing**: Read CSV files with error handling and chunking support.\n- **SQL Integration**: Insert DataFrames into SQL databases with automatic error handling and retry logic.\n- **Data Transformation**: Apply transformations to DataFrames while managing errors.\n- **Pydantic Validation**: Validate DataFrame records using Pydantic models, separating valid and invalid rows.\n\n## Installation\n```bash\npip install abraxos\n```\n\n## Usage\n\n### Reading CSV Files\n```python\nfrom abraxos import read_csv\n\nbad_lines, df = read_csv(\"data.csv\")\nprint(\"Bad lines:\", bad_lines)\nprint(df.head())\n```\n\n### Writing Data to SQL\n```python\nfrom abraxos import to_sql\n\nresult = to_sql(df, \"table_name\", connection)\nprint(\"Errors:\", result.errors)\nprint(\"Successful Inserts:\", result.success_df.shape[0])\n```\n\n### Data Transformation\n```python\nfrom abraxos import transform\n\ndef clean_data(df):\n df[\"column\"] = df[\"column\"].str.lower()\n return df\n\nresult = transform(df, clean_data)\nprint(\"Errors:\", result.errors)\nprint(\"Transformed Data:\", result.success_df.head())\n```\n\n### Data Validation\n```python\nfrom abraxos import validate\nfrom pydantic import BaseModel\n\nclass MyModel(BaseModel):\n column: str\n\nresult = validate(df, MyModel())\nprint(\"Errors:\", result.errors)\nprint(\"Valid Data:\", result.success_df.head())\n```\n\n## License\nMIT License\n\n## Contributing\nContributions are welcome! Feel free to open an issue or submit a pull request.\n\n## Author\nDeveloped by Odos Matthews\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Upgrade you Pandas ETL process.",
"version": "0.0.5",
"project_urls": null,
"split_keywords": [
"etl",
" validation",
" sql",
" csv",
" pandas"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "618e87a47d9dc8545b03afc5388a2534733963a50346ff7759c291b8d4014b3e",
"md5": "1aebb94fb9d5f3427ca5746715cc96d3",
"sha256": "4bc7fd5eaf6efb9f0a05201a0a4810cfefa7c2ae1ebfebc777f3103405cd0f0f"
},
"downloads": -1,
"filename": "abraxos-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1aebb94fb9d5f3427ca5746715cc96d3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8061,
"upload_time": "2025-02-18T00:37:34",
"upload_time_iso_8601": "2025-02-18T00:37:34.483845Z",
"url": "https://files.pythonhosted.org/packages/61/8e/87a47d9dc8545b03afc5388a2534733963a50346ff7759c291b8d4014b3e/abraxos-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e267087b97ed14e278701fe0ec30d4142684b4ef37e0b487f76b68bbd7333f0d",
"md5": "ae143df75e3b244694097dcd92694698",
"sha256": "67e13ae806737a06fb2b741b307b80f185e4ca26855e69c98b3d0a891113296b"
},
"downloads": -1,
"filename": "abraxos-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "ae143df75e3b244694097dcd92694698",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6219,
"upload_time": "2025-02-18T00:37:37",
"upload_time_iso_8601": "2025-02-18T00:37:37.024774Z",
"url": "https://files.pythonhosted.org/packages/e2/67/087b97ed14e278701fe0ec30d4142684b4ef37e0b487f76b68bbd7333f0d/abraxos-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-18 00:37:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "abraxos"
}