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.2a2.tar.gz
(5.3 MB
view details)
Built Distribution
File details
Details for the file pinnacle_cli-0.0.2a2.tar.gz
.
File metadata
- Download URL: pinnacle_cli-0.0.2a2.tar.gz
- Upload date:
- Size: 5.3 MB
- 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 | 838865b70a3fe77bbe6ed9726c1ec4ffff8c82ec226d633b2b542b0f9e54d9c7 |
|
MD5 | 9324f6058c14f4b6f7cf8c13025b4301 |
|
BLAKE2b-256 | 328e05afd3ea1c24108658251d6faa62a9852131e4bef9d6cf0c1927212bbb33 |
File details
Details for the file pinnacle_cli-0.0.2a2-py3-none-any.whl
.
File metadata
- Download URL: pinnacle_cli-0.0.2a2-py3-none-any.whl
- Upload date:
- Size: 9.6 MB
- 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 | 386e9c1bac57be6b3fc6fb76a5722dd90096cd7d4e13d53f3c5cc74a32e53b43 |
|
MD5 | d00f9cd238180d79516e86458732548c |
|
BLAKE2b-256 | d05d614f68f9bd796d02fa682d617694c8e60e48ad4785456651e0961383a2b0 |