Metadata-Version: 2.2
Name: pexels_api_python
Version: 0.1.4
Summary: A Python wrapper for the Pexels API
Home-page: https://github.com/devathrajharish/pexels_api_python
Author: Harish Devathraj
Author-email: devathrajharish@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Pexels API Python

A Python wrapper for the Pexels API, allowing you to search for photos, get photo details, and fetch popular photos.

## Get your API KEY 

https://www.pexels.com/api/

## Installation

You can install the library using pip:

```bash
pip install pexels_api_python
```
Include the below code in your main.py

```bash
from pexels_api_python.pexels_api import PexelsAPI

# Initialize the API with your API key
api_key = "API_KEY" ENTER YOUR API KEY
pexels = PexelsAPI(api_key)

# Search for photos
search_results = pexels.search_photos("mountains")

# Download the first photo from the search results

if search_results.get("photos"):
    first_photo = search_results["photos"][0]
    photo_url = first_photo["src"]["original"]
    pexels.download_photo(photo_url, "mountains.jpg")
