Skip to main content

Experimental python language server for programming by voice

Project description

pyvoice

PyPI Status Python Version License Tests

This is the language server component for the pyvoice system.

This is where all the heavy business logic and semantic analysis of the source code the user is editing is performed. pygls and lsprotocol are used as the base for the LSP server implementation, and the jedi library is used for the static analysis.

Features

  • TODO

Installation

Normally you should not have to install this package manually, as the editor plug-ins for Sublime and VSCode should automatically install it for you. However, if you want a more fine-grained control, you can install the pyvoice executable from PyPI

  • with vanilla pip
pip install pyvoice-language-server
  • or (preferred) via pipx so that it gets installed in an isolated environment.
pipx install pyvoice-language-server

these commands will make the the

pyvoice

executable available in your command line

Configuration

Security considerations

[!WARNING] This project is based on jedi and while jedi will not execute/import python code from your code base in order to perform static analysis, by design it IS GOING TO execute the python binary of the associated environment! That is something very important to keep in mind!!! There are automated checks in place to guard against malicious binaries that could for example have been injected by an attacker inside using your version control system but it is still important for you to make sure you trust the contents of the folders you're working on before pointing pyvoice to them. You can find more about the security mechanism in https://jedi.readthedocs.io/en/latest/_modules/jedi/api/environment.html under the _is_safe function

Performance Limitations

Performance the first time you generate hints for a new file can be pretty slow. However, thanks to heavy caching of intermediate results , subsequent requests to generate speech hints dramatically speed up. That being said, a couple of things to note

[!NOTE] This project has not been tested against large codebases so you have to check for yourself whether performance would be satisfactory in your use case, possibly making suitable configuration changes.

[!WARNING]

In order to meet the development time constraints, prioritize simplicity of implementation and minimize the exposure to low-level jedi internals, a trade-off between correctness and the performance of the caching mechanism had to be made

License

Distributed under the terms of the GPL 3.0 license, pyvoice is free and open source software.

The codebase also contains snippets of code borrowed from:

These are licensed under the respective licenses of the projects. The same goes for all the dependencies of pyvoice.

Also, this project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvoice_language_server-0.0.0rc1.tar.gz (28.0 kB view hashes)

Uploaded Source

Built Distribution

pyvoice_language_server-0.0.0rc1-py3-none-any.whl (31.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page