Skip to main content

No project description provided

Project description

primitive

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install primitive

Configuration

Authenticate

primitive config

Register your Hardware

primitive hardware register

License

primitive is distributed under the terms of the MIT license.

Development Setup

For Primitive engineers, you may have these steps completed.

Python Setup

# install required libs for macos
xcode-select --install

# install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# install fish
brew install fish
echo /usr/local/bin/fish | sudo tee -a /etc/shells
chsh -s /usr/local/bin/fish

# install fisher
brew install fisher
fisher install jorgebucaran/nvm.fish

# install git
brew install git

# set global info
git config --global user.email "<user@email.com>"
git config --global user.name “<firstName lastName>”

# install make
brew install make
fish_add_path /opt/homebrew/opt/make/libexec/gnubin

# install pyenv (python version manager)
brew install pyenv
set -Ux PYENV_ROOT $HOME/.pyenv
fish_add_path $PYENV_ROOT/bin
echo 'pyenv init - | source' >> ~/.config/fish/config.fish

# install the latest version of python
pyenv install 3.12.2
pyenv global 3.12.2
pip install --upgrade pip

# install uv
pip install uv

Repository Setup

Clone and run setup.

cd ~/Development/primitivecorp/
git clone git@github.com:primitivecorp/primitive-cli.git
cd primitive-cli
make setup

With the backend and frontend development environments running, configure the CLI for local use.

# bash or zsh
source .venv/bin/activate
# fish
source .venv/bin/activate.fish

primitive --host localhost:8000 config --transport http
Username []: <username> # find this on the frontend app at [http://localhost:3000](http://localhost:3000)
You can find or create a Primitive API token at http://localhost:3000/account/tokens
Please enter your Primitive API token: # create a token and copy the value here
Config created at '/Users/<user>/.config/primitive/credentials.json' for user '<username>' on host 'localhost:8000'

# verify the configuration worked via
primitive --host localhost:8000 whoami
Logged in as <username>

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

primitive-0.1.36.tar.gz (68.3 kB view details)

Uploaded Source

Built Distribution

primitive-0.1.36-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file primitive-0.1.36.tar.gz.

File metadata

  • Download URL: primitive-0.1.36.tar.gz
  • Upload date:
  • Size: 68.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for primitive-0.1.36.tar.gz
Algorithm Hash digest
SHA256 81190d0124aa7647f7f173e9a98a2351c247af82849b8ebb90dda94849b6f52a
MD5 36e5acb7dfb22687f90a72710af64eef
BLAKE2b-256 145703536b5217eefd43e8d3d1712f84cd928695aceb8225f10e001cbf3616d3

See more details on using hashes here.

File details

Details for the file primitive-0.1.36-py3-none-any.whl.

File metadata

  • Download URL: primitive-0.1.36-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for primitive-0.1.36-py3-none-any.whl
Algorithm Hash digest
SHA256 4e33fbe19d2bad801e5c7f1adca7f56c0f466107ea2775c127145b41bd80581c
MD5 7f2b487997570c420aed1e14cdc63f21
BLAKE2b-256 8d9034468a4a0f43481aadbbab7340e62e77438e617ebeb71a2df0a7cf9755a4

See more details on using hashes here.

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