diff --git a/packaging/README.md b/packaging/README.md new file mode 100644 index 0000000..a698bf4 --- /dev/null +++ b/packaging/README.md @@ -0,0 +1,26 @@ +# starlink-grpc-tools Core Module + +This project packages up the `starlink_grpc` module from the [starlink-grpc-tools](https://github.com/sparky8512/starlink-grpc-tools) project and exports it as an installable package for use by other projects. It is not needed to install this project in order to use the scripts in starlink-grpc-tools, as those have their own copy of `starlink_grpc.py`. + +`starlink_grpc.py` is the only part of the scripts in starlink-grpc-tools that is designed to have a stable enough interface to be directly callable from other projects without having to go through a clunky command line interface. It provides the low(er) level core functionality available via the [gRPC](https://grpc.io/) service implemented on the Starlink user terminal. + +# Installation + +The most recently published version of this project can be installed by itself using pip: +```shell script +pip install starlink-grpc-core +``` +However, it is really meant to be installed as a dependency by other projects. + +# Usage + +The installation process places the `starlink_grpc.py` module in the top-level of your Python lib directory or virtual environment, so it can be used simply by doing: +```python +import starlink_grpc +``` +and then calling whatever functions you need. For details, see the doc strings in `starlink_grpc.py`. + +# Examples + +For example usage, see calling scripts in the [starlink-grpc-tools](https://github.com/sparky8512/starlink-grpc-tools) project, most of which are hopelessly convoluted, but some of which show simple usage of the `starlink_grpc` functions. + diff --git a/packaging/pyproject.toml b/packaging/pyproject.toml new file mode 100644 index 0000000..63a5c5c --- /dev/null +++ b/packaging/pyproject.toml @@ -0,0 +1,9 @@ +[build-system] +requires = [ + "setuptools>=42", + "setuptools_scm[toml]>=3.4", + "wheel" +] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] diff --git a/packaging/setup.cfg b/packaging/setup.cfg new file mode 100644 index 0000000..2c0b772 --- /dev/null +++ b/packaging/setup.cfg @@ -0,0 +1,26 @@ +[metadata] +name = starlink-grpc-core +url = https://github.com/sparky8512/starlink-grpc-tools +author_email = sparky8512-py@yahoo.com +license_files = ../LICENSE +classifiers = + Development Status :: 4 - Beta + Intended Audience :: Developers + License :: OSI Approved :: The Unlicense (Unlicense) + Operating System :: OS Independent + Programming Language :: Python :: 3 + Topic :: Software Development :: Libraries :: Python Modules +description = Core functions for Starlink gRPC communication +long_description = file: README.md +long_description_content_type = text/markdown + +[options] +install_requires = + grpcio>=1.12.0 + protobuf>=3.6.0 + yagrc>=1.1.1 +package_dir = + =.. +py_modules = + starlink_grpc +python_requires = >=3.7 diff --git a/packaging/setup.py b/packaging/setup.py new file mode 100644 index 0000000..b908cbe --- /dev/null +++ b/packaging/setup.py @@ -0,0 +1,3 @@ +import setuptools + +setuptools.setup()