ONLINK: Operational Network Linkage Interface Navigator Kit - A simplified Python module for network interaction, search, and image fetching.
Project description
ONLINK: Operational Network Linkage Interface Navigator Kit
onlink is a powerful Python utility module designed to simplify common networking, search, and web-scraping tasks. Following the "simplify one thing" philosophy, search abstracts away the complexity of managing HTTP requests, parsing responses, handling errors, and integrating search APIs, making external data retrieval clean and Pythonic.
🌟 Features
- Simplified HTTP: One-line functions for fetching webpage content.
- Intelligent Search: Seamless integration with DuckDuckGo Search (DDGS) for text and image results.
- Clean Parsing: Extracts clean, readable text from complex HTML pages.
- Image Handling: Loads and displays web images directly using OpenCV, perfect for quick visualization and testing.
- Robust Input: Automatically cleans and sanitizes URLs and handles common errors internally.
📥 Installation
Install the package using pip:
# Standard installation command
pip install onlink
🚀 Quick Start Example
Retrieve the top 3 search results for a query, then read the content of the first result, and finally display images from a secondary search.
import onlink as net
# 1. Perform a Search
search_urls = net.Search('latest python utility modules', results=3)
print("--- Search Results ---")
for i, url in enumerate(search_urls):
print(f"{i+1}. {url}")
# 2. Read Clean Text from the first result (requires a valid URL)
if search_urls:
first_url = search_urls[0]
print(f"\n--- Reading Text from: {first_url} ---")
readable_text = net.Read(first_url)
print(readable_text[:500] + "...") # Print first 500 characters of the wrapped text
# 3. Display Images (requires OpenCV windows to close to continue)
print("\n--- Displaying Images for 'Python Logo' ---")
image_urls = net.Image('Python Logo', results=2)
# The net.Show() function handles loading the URLs and displaying the OpenCV windows.
net.Show(image_urls, size='640x480')
print("\nFinished example.")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onlink-0.1.0.tar.gz.
File metadata
- Download URL: onlink-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd085ed0113bbc3f1d244ccb4e2fd00bcb462905796a611b51d067f679a8f7d2
|
|
| MD5 |
b9076d4e1c740b8caae6b174f4fcd168
|
|
| BLAKE2b-256 |
a506d79c2083940d3c2e7ab093af996e9f161a301d30f3254b050bcc2f054f90
|
File details
Details for the file onlink-0.1.0-py3-none-any.whl.
File metadata
- Download URL: onlink-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3995d28189f8b676ff9e7ddcaa60d3513aa060559bbfaa68987b1e8d1da05d34
|
|
| MD5 |
37b34d5d18d82aa121b7070060467b6d
|
|
| BLAKE2b-256 |
807586721456633bb07da90caee19deedaa3b08a9b638f5e098fee7bcb118df1
|