data-ops
data operations related code
motivation
data-ops is a library with tested and used code aligning on some standards regarding code structure and quality and to avoid reinventing the wheel. It builds on top of dataops-abs.
installation
`pip install tgedr-dataops`
package namespaces and its contents
commons
- S3Connector: base class to be extended, providing a connection session with aws s3 resources
- utils_fs: utility module with file system related functions (example)
quality
- PandasValidation : GreatExpectationsValidation implementation to validate pandas dataframes with Great Expectations library (example)
sink
- LocalFsFileSink: Sink implementation class used to save/persist an object/file to a local fs location (example)
- S3FileSink: Sink implementation class used to save/persist a local object/file to an s3 bucket (example)
source
- AbstractS3FileSource: abstract Source class used to retrieve objects/files from s3 bucket to local fs location circumventing some formats download limitation
- LocalFsFileSource: Source implementation class used to retrieve local objects/files to another local fs location (example)
- PdDfS3Source: Source implementation class used to read a pandas dataframe from s3, whether a csv or an excel (xslx) file (example csv, example excel)
- S3FileCopy: Source implementation class used to copy objects/files from an s3 bucket to another s3 bucket (example)
- S3FileExtendedSource: Source implementation class used to retrieve objects/files from s3 bucket to local fs location with the extra method
get_metadataproviding sile metadata ("LastModified", "ContentLength", "ETag", "VersionId", "ContentType")(example) - S3FileSource: Source implementation class used to retrieve objects/files from s3 bucket to local fs location (example)
store
- DataFrameSplits : dataclass container for
train,test, and optionalvalidationpandas DataFrames, providing helpers to build, merge, and convert splits to/from Hugging Face datasets - FsSinglePartitionParquetStore : abstract Store implementation defining persistence on parquet files with an optional single partition, regardless of the location it should persist
- HuggingFaceDatasetStore : Store implementation class for interacting with Hugging Face Hub datasets, supporting CRUD operations on datasets and their splits (example)
- LocalFsSinglePartitionParquetStore : FsSinglePartitionParquetStore implementation using local file system (example)
- S3FsSinglePartitionParquetStore : FsSinglePartitionParquetStore implementation using aws s3 file system (example)
- ParquetStore : Store implementation class for interacting with Parquet files using a filesystem interface (example)
known issues/further development
- update data while changing its partition value (check unit test)
development
-
main requirements:
- uv
- bash
-
Clone the repository like this:
git clone git@github.com:tgedr/dataops
-
cd into the folder:
cd dataops -
install requirements:
./helper.sh reqs
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tgedr_dataops-1.1.3.tar.gz
(17.7 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 tgedr_dataops-1.1.3.tar.gz.
File metadata
- Download URL: tgedr_dataops-1.1.3.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbb23d2768a88ab93d4676ef313b47861ca324a61e91ad3cb8a782c1696405de
|
|
| MD5 |
8740ee18b6f9f70963cac54c189cdcbf
|
|
| BLAKE2b-256 |
f73496de00a66307272530b1046188cbc47186b08ae2995283442b5fc5cee5b8
|
File details
Details for the file tgedr_dataops-1.1.3-py3-none-any.whl.
File metadata
- Download URL: tgedr_dataops-1.1.3-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71ce6b2792dfac1694618ae4e86f53cef6934aa9f7ad073375a27e10314712b5
|
|
| MD5 |
caa5428c669ff434a67ec38c32bba779
|
|
| BLAKE2b-256 |
843d79e40e8fc2ea5cde37c1bd96099cbb3dd084b594d926448b93991c27944b
|