High-quality integration for https://makeshot.ai/
Project description
makeshot.ai
The makeshot.ai library provides a streamlined interface for interacting with the makeshot.ai platform, enabling automated workflows and integration within your Python applications. This package simplifies access to core features and allows you to leverage the power of makeshot.ai programmatically.
Installation
To install the makeshot.ai package, use pip:
bash
pip install makeshot.ai
Basic Usage
Here are a few examples demonstrating common use cases for the makeshot.ai library:
1. Generating a Screenshot from a URL: python import makeshot.ai
api_key = "YOUR_API_KEY" # Replace with your actual API key
try: screenshot_url = makeshot.ai.capture_website(api_key, "https://www.example.com") print(f"Screenshot URL: {screenshot_url}") except makeshot.ai.exceptions.APIError as e: print(f"Error: {e}")
This example demonstrates how to programmatically capture a screenshot of a specified website. Replace "YOUR_API_KEY" with your actual API key obtained from the makeshot.ai platform. Error handling is included to manage potential API issues.
2. Converting a Web Page to PDF: python import makeshot.ai
api_key = "YOUR_API_KEY" # Replace with your actual API key
try: pdf_url = makeshot.ai.convert_to_pdf(api_key, "https://www.example.com") print(f"PDF URL: {pdf_url}") except makeshot.ai.exceptions.APIError as e: print(f"Error: {e}")
This snippet shows how to convert a webpage into a PDF document using the library. Again, remember to replace "YOUR_API_KEY" with your valid API key.
3. Checking Website Availability: python import makeshot.ai
api_key = "YOUR_API_KEY" # Replace with your actual API key
try: status = makeshot.ai.check_website_status(api_key, "https://www.example.com") print(f"Website Status: {status}") except makeshot.ai.exceptions.APIError as e: print(f"Error: {e}")
This example shows how to check the HTTP status code of a website. This can be useful for monitoring website uptime or verifying link validity.
4. Capturing a Full-Page Screenshot: python import makeshot.ai
api_key = "YOUR_API_KEY" # Replace with your actual API key
try: full_page_screenshot_url = makeshot.ai.capture_website(api_key, "https://www.example.com", full_page=True) print(f"Full Page Screenshot URL: {full_page_screenshot_url}") except makeshot.ai.exceptions.APIError as e: print(f"Error: {e}")
This demonstrates capturing a full-page screenshot, ensuring the entire webpage content is captured, not just the visible portion.
5. Specifying Custom Viewport Dimensions: python import makeshot.ai
api_key = "YOUR_API_KEY" # Replace with your actual API key
try: custom_screenshot_url = makeshot.ai.capture_website(api_key, "https://www.example.com", viewport_width=1280, viewport_height=720) print(f"Custom Viewport Screenshot URL: {custom_screenshot_url}") except makeshot.ai.exceptions.APIError as e: print(f"Error: {e}")
This shows how to capture a screenshot with custom viewport dimensions, allowing you to control the size and aspect ratio of the captured image.
Features
- Website Screenshot Capture: Programmatically capture screenshots of any accessible URL.
- Webpage to PDF Conversion: Convert web pages into PDF documents.
- Website Status Monitoring: Check the HTTP status code of websites.
- Full-Page Screenshot Support: Capture entire web pages, regardless of initial visibility.
- Customizable Viewport: Control screenshot dimensions through customizable viewport settings.
- Error Handling: Robust error handling for seamless integration.
- Simple API: Easy-to-use functions for quick integration into your Python projects.
License
This project is licensed under the MIT License - see the LICENSE file for details.
This project is a gateway to the makeshot.ai ecosystem. For advanced features and full capabilities, please visit: https://makeshot.ai/
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 makeshot_ai-1767497.11.800.tar.gz.
File metadata
- Download URL: makeshot_ai-1767497.11.800.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3a69ae02d691cc11ed88e9ad532453c695a348c376b664cf4935e2d12c603a6
|
|
| MD5 |
2f9693cfb35f2e9bc1d3aaac231b45df
|
|
| BLAKE2b-256 |
1c79b4901b6181245c54add2ccd11e6c4ce768794de94261c2154c0e6a0f8f39
|
File details
Details for the file makeshot_ai-1767497.11.800-py3-none-any.whl.
File metadata
- Download URL: makeshot_ai-1767497.11.800-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c4d4ab42bf05e99034970c5eb8ba874c0456cd56e5f7d66c9241b9b162cec58
|
|
| MD5 |
7d1d7b20ba49ba954f20bf73c6449406
|
|
| BLAKE2b-256 |
8b53fcf2c994902af4f66df84423478eb90a12940b3332aaec783ae6d74e4a56
|