PTG_requests
PTG_requests is a Python library developed by Paras tech industries designed to streamline HTTP workflows for AI prompt interactions, cloud storage batch uploads/downloads, and HTML code fetching.
Features
AI Interaction Pipeline: Seamlessly ingest prompt files and send structured payloads to AI APIs with token authentication.
Cloud Batch Operations: Upload and download groups of project files (HTML, JS, Python scripts) using declarative file maps.
HTML Fetcher: Quick web extraction utility for scraping and retrieving page source code.
Built on requests: Robust connection management and error handling.
Installation
From Source
Clone the repository or extract the package, then run:
pip install .
In Development Mode
pip install -e .
Quickstart
- AI API Request Workflow
Send a prompt stored in a local text file directly to an AI API endpoint:
from PTG_requests import PTG
Initialize client
client = PTG()
Configure and send prompt
client.send.file_path = "Prompt.txt" client.send.add = "your-api-key-here" response = client.send("https://example.com/AI/API/chat/v1/")
print("AI Response:", response.json())
- Cloud Batch File Synchronization
Uploading Multiple Files
Upload project files in batches using key-value path mapping:
from PTG_requests import Data
data_client = Data()
Define the file list to upload
data_client.send.list(""" "index.html"="C:/projects/web/index.html" "main.py"="C:/projects/web/main.py" "App.js"="C:/projects/web/App.js" """)
Attach authentication key and destination
data_client.send.add = "your-api-key-here" data_client.send("https://example.com/cloud/upload")
Downloading and Saving Files
Download remote files and extract them into a target directory:
from PTG_requests import Data
data_client = Data()
Target endpoints and credentials
data_client.get.add = ("https://example.com/cloud/files", "your-api-key-here")
Define files to retrieve
data_client.get.list(""" "index.html" "main.py" "App.js" """)
Download and persist to local storage
data_client.get.save("./downloaded_files/")
- Fetching Raw HTML
Retrieve website markup directly:
from PTG_requests import PTG
ptg = PTG() ptg.fetch.URL = "https://example.com" html_code = ptg.fetch.execute()
print(html_code[:500])
Requirements
Python >= 3.8
requests >= 2.28.0
Support & Contact
Author: Paras tech industries
Email: Parastechindustrieshelp@gmail.com
License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
Metadata
Release files for PTG-requests 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ptg_requests-1.0.0.tar.gz | 5.8 kB | Without provenance | Details for ptg_requests-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ptg_requests-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for ptg_requests-1.0.0-py3-none-any.whl |
Total release size: 11.6 kB
Release files / ptg_requests-1.0.0.tar.gz
| Download URL | ptg_requests-1.0.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1c4fcdf632d956a2425a373a16216c2d8705751888d51107603bbf1fba6efc5
|
|
BLAKE2b-256 checksum How to use checksums |
6291dddd87758b181f1472092428eb84ceaf95e93d8483d660c789115fb7066f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / ptg_requests-1.0.0-py3-none-any.whl
| Download URL | ptg_requests-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a36feb38852347c56fdb342ab029b3004a7b9f8f3352fb57d1299848375444bc
|
|
BLAKE2b-256 checksum How to use checksums |
d5a44af0e49c351b1a41133f49d49c59ee271d46c7a6c2ca60f28b1dd5728736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for PTG-requests 1.0.0
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.