semvec/pypi-packages huggingface dataset:
oracle-object-mapping 1.0.0.dev2
Oracle Object Mapping.
License: MIT
Requires Python: >=3.7

# Oracle Object Mapping

# Requirements
- Python 3.7+

# Install
```
pip install oracle-object-mapping
```

## Example

### Types definition
```python
import datetime
from typing import Optional

from oracle_object_mapping import objects, fields


class TABLE_VARCHARS(objects.Collection[str]):
    pass


class TABLE_CLOBS(objects.Collection[str]):
    package = 'LIBRARY'
    database_type = fields.CLOB()


class BOOK(objects.Object):
    package = 'LIBRARY'
    ID: Optional[int]
    TITLE: Optional[str]
    AUTHORS: Optional[TABLE_VARCHARS]
    DEDICATION: Optional[str] = fields.CLOB()
    PAGES: Optional[TABLE_CLOBS]
    PUBLISH_DATE: Optional[datetime.datetime]
```

### Manipulate objects
```python
data = ["a" * x for x in range(10)]

table_a = TABLE_VARCHARS()
for x in data:
    table_a.append(x)

table_b = TABLE_VARCHARS.from_data(data)

# table_a == table_b
```

```python
book_a = BOOK()
book_a.TITLE = 'Hello'
book_a.AUTHORS = TABLE_VARCHARS.from_data(['Alberto', 'José'])

# ba.to_data() == {'TITLE': 'HELLO', 'AUTHORS': ['Alberto', 'José']}

data = {'TITLE': 'HELLO', 'AUTHORS': ['Alberto', 'José']}
book_b = BOOK.from_data(data)

# book_a == book_b
```

### Call function
```python
from oracle_object_mapping import utils

connection: cx_Oracle.connection
name = 'LIBRARY.CREATE_BOOK'
return_type = BOOK
new_book = utils.call_function(connection, name, return_type, args=[book_a])
print(new_book.ID)
```
channel-access.client 0.1.2
Channel Access client library
License: MIT
Requires Python: >= 3.5
Keywords: epics ca channel_access

Channel Access client library
=============================
This library contains the low-level bindings to the *libca* library and an
high-level thread-safe interface for ease of use.

For the server implementation see `channel_access.server`_.

.. _channel_access.server: https://pypi.org/project/channel_access.server

Installation
------------
Before installing the library, the environment variables ``EPICS_BASE``
and ``EPICS_HOST_ARCH`` must be set.

Then the library can be installed with pip::

    pip install channel_access.client

Examples
--------
Examples are located in the ``examples`` directory.

The ``simple.py`` example monitors a single process value and outputs the
contents of the data dictionary::

    python examples/simple.py test-pv

Get the source
--------------
The source code is available in a `Github repository`_::

    git clone https://github.com/delta-accelerator/channel_access.client

.. _Github repository: https://github.com/delta-accelerator/channel_access.client

Documentation
-------------
The documentation for the last version is available `online`_.

The documentation can also be generated from the source code with *sphinx*.
The package must be installed prior to building the documentation::

    cd /path/to/repository
    pip install .
    python setup.py build_sphinx

Then open ``build/sphinx/html/index.html``.

.. _online: https://delta-accelerator.github.io/channel_access.client

Tests
-----
Tests are run with *pytest*::

    cd /path/to/repository
    pytest -v

To run the tests for all supported version use *tox*::

    cd /path/to/repository
    tox