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:
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.
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').
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.
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.
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.
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.
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.
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.
unique_data = auto_io.deduplicate_data('Name')
Removes duplicate records based on the specified column.
Getting Data
Retrieve the stored data.
data = auto_io.get_data()
Gets the stored data.
Contributors
Version
1.0.0
Metadata
Release files for automagicio 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| automagicio-1.0.0.tar.gz | 4.6 kB | Without provenance | Details for automagicio-1.0.0.tar.gz |
Release files / automagicio-1.0.0.tar.gz
| Download URL | automagicio-1.0.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24bb875658ae1ca60b01a768fe481ecad8b5fcb8ee582d6660ad0d752e74c52d
|
|
BLAKE2b-256 checksum How to use checksums |
5ddd1e59cc009dfa10f5e1fb5eae61e5ce1992d1c643316e8fbf8321fbea2727
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.5
|
Security for automagicio 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.