Skip to main content

coopio

Library for creating data services

CsvDataService Example:

class Dummy:
    def __init__(self, a, b, c):
        self.a = a
        self.b = b
        self.c = c

    def __str__(self):
        return f"a: {self.a}, b: {self.b}, c: {self.c}"

    def __repr__(self):
        return self.__str__()

class CsvDataService_Dummy(ICsvDataService):

    def __init__(self, data_file_path: str):
        ICsvDataService.__init__(self, data_file_path)

    def translate_from_data_rows(self, df: pd.DataFrame) -> List[T]:
        ret_dummies = []

        for i, row in df.iterrows():
            new_dummy = Dummy(
                a=row['a'],
                b=row['b'],
                c=row['c']
            )
            ret_dummies.append(new_dummy)

        return ret_dummies

After Establishing the data service, data can be stored or retrieved as follows:

    dummies = []
    for ii in range(0, 5):
        dummies.append(Dummy(ii, 2, 3))

    data_service.add_or_update(obj_identifier='a', objs=dummies)

    stored = data_service.retrieve_data(obj_identifier='a')

Metadata

Release files for coopio 1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coopio 1.10
File Size Uploaded
coopio-1.10.tar.gz 28.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coopio 1.10
File Interpreter ABI Platform
coopio-1.10-py3-none-any.whl Python 3 none any Details

Total release size: 63.8 kB

Release files / coopio-1.10.tar.gz

Download URL coopio-1.10.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0eb256401cd21e77a9140a93138299717ff3f828f7df587018e2aacbe402ba14
BLAKE2b-256 checksum
How to use checksums
523e72efd2e277c40b8f8f6e9f100cea835a81f0c57ddb0c062e3494aa040587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / coopio-1.10-py3-none-any.whl

Download URL coopio-1.10-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01c2f6a04d6a231ff3df87edb6487057c8c3f39557c8d454dfb414d3478c5d4c
BLAKE2b-256 checksum
How to use checksums
ebeaf33bee6a9595b1803b68104b70a9f5f487de0fdb43a698d508074fc2fdb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

1.10 This release

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.17

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.13

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page