Metadata-Version: 2.1
Name: cottontaildb-client
Version: 0.0.4
Summary: A Cottontail DB gRPC client.
Home-page: https://github.com/Spiess/cottontaildb-python-client
Author: Florian Spiess
Author-email: florian.spiess@unibas.ch
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/Spiess/cottontaildb-python-client/issues
Description: # Cottontail DB gRPC Python Client
        
        [![pypi](https://img.shields.io/pypi/v/cottontaildb-client.svg)](https://pypi.org/project/cottontaildb-client/)
        [![Python package workflow](https://github.com/Spiess/cottontaildb-python-client/actions/workflows/python-package.yml/badge.svg)](https://github.com/Spiess/cottontaildb-python-client/actions/workflows/python-package.yml)
        
        A Cottontail DB gRPC client for Python. Built with [Cottontail DB Proto](https://github.com/vitrivr/cottontaildb-proto)
        version `0.12.2`. Comes with an interactive CLI for remote DB access.
        
        ## Installation
        
        Clone and install locally, or with `pip install cottontaildb-client`.
        
        ## Usage
        
        Running the interactive CLI is as easy as `cottontaildb-client [--port PORT] host`.
        
        Example usage in scripts:
        
        ```python
        from cottontaildb_client import CottontailDBClient, Type, Literal, column_def
        
        with CottontailDBClient('localhost', 1865) as client:
            # Create schema
            client.create_schema('example_schema')
            # Define entity columns
            columns = [
                column_def('id', Type.STRING, nullable=False),
                column_def('value', Type.INTEGER, nullable=True)
            ]
            # Create entity
            client.create_entity('example_schema', 'example_entity', columns)
            # Insert entry
            entry = {'id': Literal(stringData='test_1'), 'value': Literal(intData=1)}
            client.insert('example_schema', 'example_entity', entry)
            # Insert batch
            columns = ['id', 'value']
            values = [
                [Literal(stringData='test_10'), Literal(intData=10)],
                [Literal(stringData='test_20'), Literal(intData=20)]
            ]
            client.insert_batch('example_schema', 'example_entity', columns, values)
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
