No project description provided
Project description
Pinnacle Command Line Interface
This is a command line interface for the Pinnacle API.
Pre-requisites
- Python 3.12 or higher
- Poetry: Manages Python dependencies and creates the
pinnacle
command from the Python code inpinnacle-cli
.
Running the Pinnacle locally (Python)
To run the Pinnacle locally, you need to have the command line tool (pinnacle-cli
) and the packages installed in your local environment.
- Build the CLI tool by running
poetry build
in thecli
directory. This will create a.whl
file in thecli/dist
directory. This file will be used to install the CLI tool in your local environment. - Build the
pinnacle-python
package by runningpoetry build
in theclient-packages/pinnacle-python
directory. This will create a.whl
file in theclient-packages/pinnacle-python/dist
directory. This file will be used to install thepinnacle-python
package in your local environment. - Go to your Python project directory with
cd $PATH
. - Create a virtual environment with Python version 3.12 or higher. In your project environment, install the
pinnacle-python
package by runningpip install $PATH_TO_PINNACLE/client-packages/pinnacle-python/dist/pinnacle_python-$VERSION-py3-none-any.whl
in theclient-packages/pinnacle-python
directory. Replace$PATH_TO_PINNACLE
with the path to the Python package and$VERSION
with the version of the package. The version can be found in thepyproject.toml
file under the[tool.poetry]
section. - In your project environment, install the
pinnacle-cli
package by runningpip install $PATH_TO_PINNACLE/cli/dist/pinnacle_cli-$VERSION-py3-none-any.whl
in thecli
directory. Replace$PATH_TO_PINNACLE
with the path to the Python package and$VERSION
with the version of the package. - Create a
pinnacle
directory in your project and add the Pinnacle functions to this directory. For example
from pinnacle_python import endpoint
@endpoint
def hello_world():
return "Hello, World!"
creates a /hello_world
endpoint that returns "Hello, World!".
7) Run pinnacle {dev|prod}
to run the CLI. This will read the functions in the pinnacle
directory and create the endpoints locally.
Environment Variables
You can configure the CLI tool using the following environment variables:
PINNACLE_HOST
: The host of the Pinnacle API. Default islocalhost
.PINNACLE_PORT
: The port of the Pinnacle API. Default is8000
.PINNACLE_DIRECTORY
: The directory where the Pinnacle functions are located. Default is./pinnacle
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pinnacle_cli-0.0.1.tar.gz
(2.7 kB
view details)
Built Distribution
File details
Details for the file pinnacle_cli-0.0.1.tar.gz
.
File metadata
- Download URL: pinnacle_cli-0.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bd396561c86e70ce494b05d8496ced242f12fab85ae31b09964282cbb764cc6 |
|
MD5 | 7964bde05df93d22a84e10121852311d |
|
BLAKE2b-256 | 8670e8b70eb3b20a59bc89d8546afccdf60f4b7821baf12f97b1ad33e197d0f8 |
File details
Details for the file pinnacle_cli-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pinnacle_cli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8455131974647fe4696c852ade88a516a4104f3a99ea6b6593332a5ae41e9f9 |
|
MD5 | 8dd4a829338dee20a39658c8f66feb4d |
|
BLAKE2b-256 | 5a0cd89c8f09fdf6d2b81cdc7391bdf1deccdb554a51d6826181684919c04ce9 |