# AutoMagicIO
AutoMagicIO is a versatile Python module designed to streamline input/output operations in Python projects. It provides a set of intuitive interfaces and automated routines to handle common file operations, such as reading, writing, and parsing data from various file formats.
## Installation
You can install AutoMagicIO via pip:
```bash
pip install automagicio
```
## Usage
### Reading Data
To get started with AutoMagicIO, you'll need to create an instance of the `AutoMagicIO` class, providing the filename of the data you want to work with.
```python
from automagicio import AutoMagicIO
auto_io = AutoMagicIO('data.csv')
auto_io.read()
```
> Reads data from the specified file format (CSV, JSON, or XML) and automatically detects the format.
### Writing Data
You can save your processed data using the `write` method, specifying the output filename and format ('json' or 'xml').
```python
auto_io.write('output.json', format='json')
```
> Writes data to a file in the specified format.
### Data Validation
You can check if your data contains required fields using the `validate_data` method.
```python
valid = auto_io.validate_data()
```
> Checks if data contains required fields (Name, Age, City).
### Sorting Data
To sort your data based on a specific column, use the `sort_data` method.
```python
sorted_data = auto_io.sort_data('Name')
```
> Sorts data based on the specified column.
### Aggregating Data
You can perform aggregation operations (sum, average, count) on a specific column.
```python
sum_result = auto_io.aggregate_data('Age', 'sum')
average_result = auto_io.aggregate_data('Age', 'average')
count_result = auto_io.aggregate_data('Age', 'count')
```
> Performs aggregation operations on the specified column.
### Filtering Data
Filter data based on a specific condition.
```python
filtered_data = auto_io.filter_data('City', 'New York')
```
> Filters data based on the specified condition.
### Transforming Data
Apply a specified transformation function to the values of a specific column.
```python
def transform_age(age):
return int(age) + 5
transformed_data = auto_io.transform_data('Age', transform_age)
```
> Applies a specified transformation function to the values of the specified column.
### Deduplicating Data
Remove duplicate records based on a specified column.
```python
unique_data = auto_io.deduplicate_data('Name')
```
> Removes duplicate records based on the specified column.
### Getting Data
Retrieve the stored data.
```python
data = auto_io.get_data()
```
> Gets the stored data.
## Contributors
- [Ishan Oshada](https://github.com/ishanoshada)
## Version
1.0.0
Raw data
{
"_id": null,
"home_page": "https://github.com/ishanoshada/automagicio",
"name": "automagicio",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "auto,magic,io,file handling,data transformation",
"author": "Ishan Oshada",
"author_email": "ic31908@gamil.com",
"download_url": "https://files.pythonhosted.org/packages/5d/dd/1e59cc009dfa10f5e1fb5eae61e5ce1992d1c643316e8fbf8321fbea2727/automagicio-1.0.0.tar.gz",
"platform": null,
"description": "# AutoMagicIO\n\nAutoMagicIO is a versatile Python module designed to streamline input/output operations in Python projects. It provides a set of intuitive interfaces and automated routines to handle common file operations, such as reading, writing, and parsing data from various file formats.\n\n## Installation\n\nYou can install AutoMagicIO via pip:\n\n```bash\npip install automagicio\n```\n## Usage\n\n### Reading Data\n\nTo get started with AutoMagicIO, you'll need to create an instance of the `AutoMagicIO` class, providing the filename of the data you want to work with.\n\n```python\nfrom automagicio import AutoMagicIO\n\nauto_io = AutoMagicIO('data.csv')\nauto_io.read()\n```\n> Reads data from the specified file format (CSV, JSON, or XML) and automatically detects the format.\n\n### Writing Data\n\nYou can save your processed data using the `write` method, specifying the output filename and format ('json' or 'xml').\n\n```python\nauto_io.write('output.json', format='json')\n```\n> Writes data to a file in the specified format.\n\n### Data Validation\n\nYou can check if your data contains required fields using the `validate_data` method.\n\n```python\nvalid = auto_io.validate_data()\n```\n> Checks if data contains required fields (Name, Age, City).\n\n### Sorting Data\n\nTo sort your data based on a specific column, use the `sort_data` method.\n\n```python\nsorted_data = auto_io.sort_data('Name')\n```\n> Sorts data based on the specified column.\n\n### Aggregating Data\n\nYou can perform aggregation operations (sum, average, count) on a specific column.\n\n```python\nsum_result = auto_io.aggregate_data('Age', 'sum')\naverage_result = auto_io.aggregate_data('Age', 'average')\ncount_result = auto_io.aggregate_data('Age', 'count')\n```\n> Performs aggregation operations on the specified column.\n\n### Filtering Data\n\nFilter data based on a specific condition.\n\n```python\nfiltered_data = auto_io.filter_data('City', 'New York')\n```\n> Filters data based on the specified condition.\n\n### Transforming Data\n\nApply a specified transformation function to the values of a specific column.\n\n```python\ndef transform_age(age):\n return int(age) + 5\n\ntransformed_data = auto_io.transform_data('Age', transform_age)\n```\n> Applies a specified transformation function to the values of the specified column.\n\n### Deduplicating Data\n\nRemove duplicate records based on a specified column.\n\n```python\nunique_data = auto_io.deduplicate_data('Name')\n```\n> Removes duplicate records based on the specified column.\n\n### Getting Data\n\nRetrieve the stored data.\n\n```python\ndata = auto_io.get_data()\n```\n> Gets the stored data.\n\n## Contributors\n\n- [Ishan Oshada](https://github.com/ishanoshada)\n\n## Version\n\n1.0.0",
"bugtrack_url": null,
"license": "",
"summary": "A versatile plugin module for streamlining input/output operations in Python projects.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/ishanoshada/automagicio"
},
"split_keywords": [
"auto",
"magic",
"io",
"file handling",
"data transformation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5ddd1e59cc009dfa10f5e1fb5eae61e5ce1992d1c643316e8fbf8321fbea2727",
"md5": "cea5f8be1018c28cd686c20535ac8d14",
"sha256": "24bb875658ae1ca60b01a768fe481ecad8b5fcb8ee582d6660ad0d752e74c52d"
},
"downloads": -1,
"filename": "automagicio-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "cea5f8be1018c28cd686c20535ac8d14",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4581,
"upload_time": "2023-10-25T06:17:34",
"upload_time_iso_8601": "2023-10-25T06:17:34.815057Z",
"url": "https://files.pythonhosted.org/packages/5d/dd/1e59cc009dfa10f5e1fb5eae61e5ce1992d1c643316e8fbf8321fbea2727/automagicio-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-25 06:17:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ishanoshada",
"github_project": "automagicio",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "automagicio"
}