Skip to main content

Python NLIP Repositories

This repository contains one component of the various python repositories for NLIP Proof of Concept implementation. The various repositories are:

  • nlip_sdk: this provides a software development kit in python that implements the abstractions of NLIP message, submessages along with a factory to ease the creation of NLIP messages and submessages
  • nlip_client: this provides a package that simplifies the task of sending NLIP messages using the base underlying protocol. The current implementation uses httpx as the base transfer package.
  • nlip_server: this provides a paclage that simplifies the task of writing a server-side NLIP application. This provides the abstractions of a NLIPApplication and a NLIP Session. An application consists of multiple sessions.

The above three are the components needed to write a client or a server. To write a client, you need to use nlip_sdk and nlip_client. To write a server side application, you need to use nlip_sdk and nlip_server.

The following repositories contain a few simple clients and server side applications:

  • nlip_soln: this provides a few simple prototype server side solutions using the nlip_server package
  • text_client: this provides a simple text based chatbot to interface with a NLIP server
  • kivy_client: this provides a python kivy based visual client to interact with an NLIP server

NLIP Server

Welcome to the NLIP Server! This project is a basic implementation of NLIP server side protocol.

This package provides a library that can easily be customized to create your own NLIP based Solution.

The package depends on the NLIP SDK package.

Installation

This project uses Poetry for dependency management. First, please install Poetry.

To set up the Python project, create a virtual environment using the following commands.

  1. Create the virtual environment:
poetry env use python
  1. Install the application dependencies
poetry install

Publishing the Package

To publish the package to PyPI, ensure that your changes are committed and then create a version tag. You can do this with the following commands:

git tag v0.1.0  # Replace with new version
git push origin v0.1.0

Defining a new Server Side Solution

To define a new solution, you need to provide two subclasses of the provided abstract classes: NLIPApplicaiton and NLIPSession.

These two classes are defined in module server

The main routine of the solution should call the start_server routine in module server to create an instance of the solution server-side application. start_server takes a subclass of NLIP_Application as an argument.

An example simple echo application is included in the file echo.py

To run the echo server, use the following command

poetry run fastapi dev nlip_server/echo.py

Release files for nlip-server 0.1.3

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

Source distribution (sdist)

Source distribution for nlip-server 0.1.3
File Size Uploaded
nlip_server-0.1.3.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nlip-server 0.1.3
File Interpreter ABI Platform
nlip_server-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / nlip_server-0.1.3.tar.gz

Download URL nlip_server-0.1.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b2c209993289bcf3c9abb4e0135afc73b32c1f7277d8a0e7aa6a447ff65c0b96
BLAKE2b-256 checksum
How to use checksums
f1340f91bcd21e14b84a1cb90b41b92efcd0bea04fddd7c87672bd46adb590d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1018-azure

Release files / nlip_server-0.1.3-py3-none-any.whl

Download URL nlip_server-0.1.3-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99909d60cc4e83ea45c4abb86be2f1a838d4d64502ad5752dc7703e3e0b2dd4c
BLAKE2b-256 checksum
How to use checksums
b9990349b48f4af861a2752b90526a18ccdb1e20169dbe5bea5c914dfd237c7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1018-azure

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.0

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