Metadata-Version: 2.4
Name: PTG_requests
Version: 1.0.0
Summary: A customized requests client for AI prompt delivery, cloud storage batch synchronization, and HTML fetching.
Home-page: https://github.com/PythonDevParas/PTG_requests
Author: Paras tech industries
Author-email: Paras tech industries <Parastechindustrieshelp@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/PythonDevParas/PTG_requests
Project-URL: Author, https://parasboxcloud.ai.studio
Project-URL: Bug Tracker, https://github.com/PythonDevParas/PTG_requests/issues
Keywords: requests,ai,cloud-storage,http,paras-tech
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests>=2.28.0
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

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

1. 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())


2. 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/")


3. 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.
