A Python application for interacting with the FreshService API, featuring both a programmatic interface and a GUI for creating tickets and managing requesters.

- FreshService API Integration: Complete Python wrapper for FreshService ticket management
- GUI Application: User-friendly interface built with CustomTkinter for creating tickets
- Requester Management: Fetch and manage FreshService requesters
- Ticket Creation: Create incidents and service requests with customizable fields
- Environment Configuration: Secure API key management using environment variables
- Python 3.13 or higher
- FreshService API access with valid API key
- Clone the repository:
git clone https://github.com/Brand07/PyFreshService.git
cd PyFreshService
- Install dependencies using uv (recommended) or pip:
# Using uv
uv sync
# Or using pip
pip install -r requirements.txt
- Create a
.env
file in the project root with your FreshService credentials:
API_KEY=your_freshservice_api_key
API_URL=https://your-domain.freshservice.com/api/v2
REQUESTER_URL=https://your-domain.freshservice.com/api/v2/requesters
REQUESTER_ID=your_default_requester_id
RESPONDER_ID=your_default_responder_id
GROUP_ID=your_default_group_id
Launch the graphical interface for easy ticket creation:
python ui.py
The GUI provides:
- Dropdown menus for ticket types, priorities, and services
- Email/requester selection
- Rich text description input
- One-click ticket creation
from fresh import FreshServiceAPI
import os
# Initialize the API client
api = FreshServiceAPI(
ticket_api_url=os.getenv("API_URL"),
requesters_api_url=os.getenv("REQUESTER_URL"),
api_key=os.getenv("API_KEY")
)
# Create a ticket
ticket = api.create_ticket(
subject="Network connectivity issue",
description="User cannot access shared drives",
email="user@company.com",
priority=3, # High priority
type="Incident",
category="Network"
)
# Get all requesters and save to JSON
requesters = api.get_requesters(output_file="requesters.json")
PyFreshService/
├── fresh.py # Core FreshService API wrapper
├── ui.py # GUI application using CustomTkinter
├── requesters.json # Cached requester data
├── pyproject.toml # Project dependencies and metadata
├── .env # Environment variables (create this)
├── UI_Files/ # GUI configuration files
│ ├── window.json
│ ├── v2.json
│ └── updated_window.json
└── README.md # This file
- requests: HTTP library for API calls
- customtkinter: Modern GUI framework
- ctkmessagebox: Message boxes for the GUI
- python-dotenv: Environment variable management
- pillow: Image processing support
- tomli: TOML file parsing
Variable | Description | Required |
---|---|---|
API_KEY |
Your FreshService API key | Yes |
API_URL |
FreshService API base URL | Yes |
REQUESTER_URL |
FreshService requesters endpoint | Yes |
REQUESTER_ID |
Default requester ID for bulk operations | No |
RESPONDER_ID |
Default responder ID | No |
GROUP_ID |
Default group ID for ticket assignment | No |
1
: Low2
: Medium3
: High4
: Urgent
2
: Open3
: Pending4
: Resolved5
: Closed
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
For support or questions, please open an issue on the GitHub repository.
- Initial release
- Core FreshService API integration
- GUI application for ticket creation
- Requester management features