Metadata-Version: 2.4
Name: nerdd-link
Version: 0.2.26
Summary: Run a NERDD module as a service
Author-email: Steffen Hirte <steffen.hirte@univie.ac.at>
Maintainer-email: Steffen Hirte <steffen.hirte@univie.ac.at>
License: BSD 3-Clause License
        
        Copyright (c) 2023 - present, The Computational Drug Discovery and Design Group (COMP3D)
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project-URL: Repository, https://github.com/molinfo-vienna/nerdd-link
Keywords: science,research,development,nerdd
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: nerdd-module>=0.3.36
Requires-Dist: pandas>=1.2.1
Requires-Dist: pyyaml~=6.0
Requires-Dist: filetype~=1.2.0
Requires-Dist: rich-click>=1.7.1
Requires-Dist: stringcase~=1.2.0
Requires-Dist: numpy
Requires-Dist: simplejson>=3
Requires-Dist: pydantic>=2
Requires-Dist: aiokafka>=0.12.0
Requires-Dist: importlib-metadata>=4.6; python_version < "3.10"
Provides-Extra: dev
Requires-Dist: mypy; extra == "dev"
Requires-Dist: ruff==0.8.0; extra == "dev"
Requires-Dist: pre-commit>=2; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-sugar; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: pytest-bdd==7.3.0; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: pytest-watcher; extra == "test"
Requires-Dist: hypothesis; extra == "test"
Requires-Dist: hypothesis-rdkit; extra == "test"
Provides-Extra: docs
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocstrings; extra == "docs"
Dynamic: license-file

# NERDD-Link

Run a [NERDD module](https://github.com/molinfo-vienna/nerdd-module) as a  
service that consumes input molecules and produces prediction tuples.


## Installation

```bash
pip install -U nerdd-link
```
  
## Usage

When a class inherits from ```nerdd_module.AbstractModel``` (see 
[NERDD Module Github page](https://github.com/molinfo-vienna/nerdd-module)), it can be 
used to create a Kafka service. 

```bash 
# run a Kafka service for NerddModel on localhost:9092
run_nerdd_server package.path.to.NerddModel

# modify broker url, input topic and batch size
run_nerdd_server package.path.to.NerddModel \
  --broker-url my-cluster-kafka-bootstrap.kafka:9092 \
  --input-topic examples \
  --batch-size 10

# more information via --help
run_nerdd_server --help
```

If the model class is called ```ExamplePredictionModel```, the server will read input 
tuples from the input topic ```example-prediction-inputs``` in batches of size 100
and write results to the ```results``` topic. The batch size specifies the number
of input tuples that are given to the model at once.

## Communication

