No project description provided
Project description
PIP Package henryobj Overview - 24th of January
This codebase is a Python package designed to facilitate web scraping, interactions with OpenAI's API, and provide a suite of utility functions. It is structured to be modular, allowing each component to function independently or in conjunction with others, promoting maintainability and scalability.
Module Descriptions
web.py
- Purpose: Handles web content retrieval and processing.
- Key Functions:
create_session()
: Initializes arequests.Session
with retry strategies for consistent web scraping.clean_soup()
: Processes a BeautifulSoup object to extract clean text, removing superfluous HTML elements.crawl_website()
: Performs recursive website crawling from a specified URL, accumulating data in memory.fetch_content_url()
: Retrieves webpage content, managing HTTP status codes and implementing retry mechanisms.
- Interactions: Utilizes
requests
for HTTP interactions andBeautifulSoup
for HTML parsing. Integrates withbase.py
for error logging andoai.py
for performance metrics.
oai.py
- Purpose: Facilitates communication with OpenAI's services, including API interactions and response handling from GPT models.
- Key Functions:
ask_question_gpt()
: Queries an OpenAI GPT model and returns its response.request_chatgpt()
: Initiates a request to ChatGPT with a given conversational context.embed_text()
: Produces text embeddings using OpenAI's embedding model.
- Interactions: Leverages the
openai
library for API requests and relies onbase.py
for token management and error reporting.
base.py
- Purpose: Offers foundational utility functions for cross-module operations.
- Key Functions:
log_issue()
: Captures and logs detailed error information, including the affected function and module.remove_excess()
: Refines text by eliminating redundant spaces and line breaks.check_co()
: Verifies the presence of an internet connection.
- Interactions: Provides essential services like error handling and text cleanup used by various parts of the codebase.
gpt.py
- Purpose: Provides interfaces to GPT-4 for generating READMEs and other textual content.
- Key Functions:
gpt_readme_generator()
: Constructs README content by examining a specified repository path.gpt_generate_readme()
: Generates and saves a README.md file within a target repository.
- Interactions: Collaborates with
oai.py
for GPT model interactions and utilizes internally defined roles to direct content creation.
__init__.py
- Purpose: Serves as the package initializer, importing all necessary modules for user accessibility.
- Interactions: Critical for package integrity, enabling module imports upon package usage without housing direct functionality.
Additional Notes
This ReadME was generated automatically. See gpt.py to use it for your repos.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
henryobj-0.3.2.tar.gz
(27.0 kB
view details)
Built Distribution
henryobj-0.3.2-py3-none-any.whl
(27.9 kB
view details)
File details
Details for the file henryobj-0.3.2.tar.gz
.
File metadata
- Download URL: henryobj-0.3.2.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f647167bc54964a511610ff57fa762a3ae607c9f15c205856382387e893a19dd |
|
MD5 | 102e1f5352cc197b9d1e1202135ae63f |
|
BLAKE2b-256 | a0d40324bd066b0f8b3a84ed3f250f5ec96f094c9993fa57d6c9f418b3180455 |
File details
Details for the file henryobj-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: henryobj-0.3.2-py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aa41066f0e9c92a8c36c91c115aaf0ce2ff76076b44233260c3157fd5a3222e |
|
MD5 | c47335e393ea4f371c9d4ff1486f1df8 |
|
BLAKE2b-256 | a7b78f7e3e5409dc0da1926663953c64ea073d9c6d3d13a09fbdd8ec86218740 |