Skip to main content

PTG_APIs

Official Python Client SDK for PTG Services:

Cognixx AI (cognix_ai / CognixxAI) with automatic free model fallback (model="free" → COGNIX/COGNIX-coder)

Cognixx Cloud (CognixxCloud)

PCB (PCBClient - Paras Box Cloud)

Infinity AI (InfinityAI)

PTGWeather (100% Free real-time live weather without API keys)

PTGTime (Real-time network time & timezone sync)

📦 Installation

Install directly via pip:

pip install PTG_APIs

Or install locally in editable mode for development:

pip install -e .

🚀 Quickstart Examples

  1. Direct Import of Cognixx AI

Access the default free endpoints, model credentials, and run inference immediately:

from PTG_APIs import cognix_ai

Check free default credentials & endpoint

print("Free API Key :", cognix_ai.free_api) print("Free Model :", cognix_ai.free_model) print("Free Endpoint:", cognix_ai.free_url)

Run prompt (model="free" automatically routes to COGNIX/COGNIX-coder)

response = cognix_ai.generate("Write a quick Python script to calculate factorials", model="free") print(response)

  1. Live Weather & Time (No API Key Required)

from PTG_APIs import PTGWeather, PTGTime

Real-time weather lookup

weather = PTGWeather.get_current("Haridwar") print("Temperature:", weather.get("temp_c"), "°C") print("Condition :", weather.get("condition")) print("Humidity :", weather.get("humidity"))

Real-time network time lookup

current_time = PTGTime.now("Asia/Kolkata") print("Live Time:", current_time.get("datetime"))

  1. Paras Box Cloud (PCB)

from PTG_APIs import PCBClient

pcb = PCBClient()

Check free endpoint details

print("PCB Key :", pcb.free_api) print("PCB Endpoint:", pcb.free_url)

List remote files

files = pcb.list_files(folder_path="/") print(files)

  1. Master Unified Client

Interact with all services through a single instance:

from PTG_APIs import PTG

ptg = PTG()

Query weather

print(ptg.weather.get_current("Delhi"))

Query time

print(ptg.time.now())

Query Cognixx AI

reply = ptg.cognix_ai.generate("Explain quantum computing in two sentences", model="free") print(reply)

🛠️ Publishing to PyPI

To build and publish this package:

1. Install build & upload tools

pip install --upgrade build twine

2. Build the wheel and source distribution

python -m build

3. Upload to PyPI

twine upload dist/*

📄 License

This project is licensed under the MIT License.

Metadata

Release files for PTG-APIs 1.0.2

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

Source distribution (sdist)

Source distribution for PTG-APIs 1.0.2
File Size Uploaded Provenance Actions
ptg_apis-1.0.2.tar.gz 6.8 kB Without provenance Details for ptg_apis-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PTG-APIs 1.0.2
File Interpreter ABI Platform Actions
ptg_apis-1.0.2-py3-none-any.whl Python 3 none any Details for ptg_apis-1.0.2-py3-none-any.whl

Total release size: 13.5 kB

Release files / ptg_apis-1.0.2.tar.gz

Download URL ptg_apis-1.0.2.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5db2a852c962129dae42433563533b541bdf9220cb26c3dbd8d11990e869a15a
BLAKE2b-256 checksum
How to use checksums
31b803b2c97ac5a0a951aece4e0403d8f9e428fb7ae81bbe9a1d1f5b597c6dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / ptg_apis-1.0.2-py3-none-any.whl

Download URL ptg_apis-1.0.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ee07903aceb99a8ce91e9c5fc2135090efbe73bcb20b9bf548d55a326fc114a
BLAKE2b-256 checksum
How to use checksums
c148f7856b7fd59ef48a4b4e40995f9f652c10611ade66afd8f210c0fb11dce2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for PTG-APIs 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

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