Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

commandintegrator

What it does

CommandIntegrator is a lightweight framework and API for creating apps controlled with human language interfaces. It concists of base classes and ready-to-use objects along with a set and clear structure for how to develop and scale a chat bot / Virtual assistant.

Objects such as the Feature, which can be thought of a micro service within your app, makes it easier to keep the OOP structure clean and well maintained. Automatic command parsing with the CommandParser and CommandProcessor makes it very straight forward to build and scale your command-controlled application without having to worry about name and word collisions, edge-case actions etcetera.

Objects and wrappers for more effective and easier development

commandintegrator exists for one reason: To make development of language-driven apps easier. Decorator wrappers for automated logging, scheduling of function execution, caching objects and API DAO's are a few that are included in the package.

You can build the backend of your virtual assistant / chatbot with the tools and structures of commandintegrator and use it in your chatbot for whichever platform you want to use. commandintegrator is platform independent and can be used even with a simple command-line app as demonstrated below.

Example

Here's a short example of how to create a virtual assistant that tells you what time it is. For a more comprehensive example, please read the demo_feature.py file here

import commandintegrator as ci
import time
from pprint import pprint

class ClockFeature(ci.FeatureBase):
    def __init__(self, *args, **kwargs):
        super().__init__(self, *args, **kwargs)
        self.command_parser = ci.CommandParser()

        # Defines which keywords that this Feature identifies with initially
        self.command_parser.keywords = ('what')

        # The Callback object is a more intricate and well defined way of 
        # binding a sentence / sequence of words to a function. 
        self.command_parser.callbacks = ci.Callback(lead = 'time', trail = ('is', 'it'), func = self.get_time)

    @ci.logger.loggedmethod
    def get_time(self):
        ci.logger.log(message = "Manual log entry here", level = "info")
        return f'The time is {time.strftime("%H:%M")}.'



if __name__ == '__main__':
    processor = ci.CommandProcessor()
    processor.features = (ClockFeature(),)
    msg = ci.Message()

    while True:
        msg.content = input("-> ")
        response = processor.process(msg)

        print("\n-> Response received:\n")
        pprint(f"\t{response.__dict__}")
        print("\n-> Bot said: ", response.response(), "\n")

Metadata

Release files for commandintegrator 1.3.0

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

Source distribution (sdist)

Source distribution for commandintegrator 1.3.0
File Size Uploaded Provenance Actions
commandintegrator-1.3.0.tar.gz 19.6 kB Without provenance Details for commandintegrator-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 49.4 kB

Release files / commandintegrator-1.3.0.tar.gz

Download URL commandintegrator-1.3.0.tar.gz
Size 19.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1fd1190f4edcad85e2fd87abe86077960187dccade0f34feb46e09141b9fc739
BLAKE2b-256 checksum
How to use checksums
311436f0fb416efca6f8f9905c8ae91811b638406f726074b3f765623d47f43e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Release files / commandintegrator-1.3.0-py3-none-any.whl

Download URL commandintegrator-1.3.0-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8847b3843f408f5c770a4907d32ec6b05ffc18984889a5aedec5a6af9e0edce4
BLAKE2b-256 checksum
How to use checksums
6c6fb4c9024499a4ae04fb1968005044129df01fb501b7659c53735de2125272
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

Security for commandintegrator 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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