Skip to main content

Telemetry

This very simple app retrieves and posts json contents to a mongodb.

Build and Install

git clone git@github.com:bendhouseart/telemetry.git
cd telemetry
poetry install
    If you receive error regarding python version, change it in pyproject.toml and run poetry lock --no-update
poetry build
pip install dist/telemetry-0.1.0.tar.gz

Setup for your environment

After installing in the previous step run the setup-telemetry command and follow the prompt:

(telemetry-LxPB_LWP-py3.11) setup-telemetry                                          
Enter the path to the .env file (/Users/galassiae/.telemetry.env): 
Enter the connection string to the mongodb database (127.0.0.1:27417): 
Enter the name of the mongodb user (): 
Enter the name of the database (telemetry): 
Enter the name of the collection (telemetry): 
Enable rate limiting? [y/n]: n
The .env file already exists
MONGO_DB_ADDRESS='127.0.0.1:27417'
MONGO_DB_USER='telemetry'
MONGO_DB_NAME='telemetry'
MONGO_DB_COLLECTION='telemetry'
TELEMETRY_RATE_LIMITING='False'

Override existing .env file? [y/n]: y

Running this app

This app can started using the start-telemetry command after installation via pip:

start-telemetry

Or it can be run directly with:

uvicorn telemetry:app --host 0.0.0.0 --port 80

Post a JSON to the database

curl -H 'Content-Type: application/json' -d '{ "what":"myjson","its":"toogood" }' -X POST 127.0.0.1:8000/telemetry/

Additionally there are two very simple scripts that illustrate how to post and get using this app:

bash telemetry/curl_post.sh
bash telemetry/curl_get.sh

Some additional notes for interacting with the mongodb directly or starting this app

start uvicorn/run this app

uvicorn telemetry:app --host 0.0.0.0 --port 80

to get into monash/mongodb interface run

mongosh

to connect to telemetry database

first show all dbs

show dbs

select the telemetry db for use

use telemetry

and to show all items in the selected telemetry db

db.telemetry.find()

Metadata

Release files for conversiontelemetry 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conversiontelemetry 0.0.3
File Size Uploaded
conversiontelemetry-0.0.3.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for conversiontelemetry 0.0.3
File Interpreter ABI Platform
conversiontelemetry-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / conversiontelemetry-0.0.3.tar.gz

Download URL conversiontelemetry-0.0.3.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1a6d3b639fd07f0dd219ea0288c2a3f1370e14bbebff7244b49ad49ed2fd6029
BLAKE2b-256 checksum
How to use checksums
3ec7051d4aba27e68ff862fc1872c6cab909dc1214166a0479e74bf98f096514
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.0 Darwin/23.6.0

Release files / conversiontelemetry-0.0.3-py3-none-any.whl

Download URL conversiontelemetry-0.0.3-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23cdd53c12253c32b40ab74a81f52b2b5ebbec97f49313d49605b7819979ffce
BLAKE2b-256 checksum
How to use checksums
d2bbf6eb008d887395b498725e71eaf89438c37349bac029774b3a44618049a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.0 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page