
This blog post is focused on automating the process of creating an appointments and saving it in ICS file format. For that purpose, we will opt for Aspose.Email for Python via .NET which is a powerful appointment making service along with other enterprise-level features. So, let’s move on and implement how to create an appointment in Python and save it in ICS file format which you can then open in Outlook or any other software that supports ICS file formats. You can schedule appointments with all the necessary data such as date, time slot and locations.
- Appointment Making Service Installation
- Create an Appointment in Python - Steps
- Create an ICS File Programmatically - Code Snippet
Appointment Making Service Installation
You may download the latest version here, or run the following pip command into terminal/CMD to have this Python API installed:
pip install Aspose.Email-for-Python-via-NET

However, you can visit this installation guide to check all the details.
Create an Appointment in Python - Steps
You can follow the following steps to create an ICS file:
- Initialize an instance of the Mailaddress class with the email address of the sender.
- Create an object of the MailAddressCollection class.
- Invoke the add method to the mail address of the attendee.
- Instantiate an instance of the Appointment class to set the date and time of the meeting.
- Define the meeting summary by setting the value of summary property.
- Set the description of the appointment.
- Call the save method to create an appointment and save it in ICS file format.
Create an ICS File Programmatically - Code Snippet
Now, try the following code sample to create an appointment in Python using Aspose.Email for Python via .NET:
import aspose.email as ae | |
from aspose.email import MailAddressCollection | |
from aspose.email import MailAddress | |
from aspose.email.calendar import Appointment | |
from aspose.email.calendar import AppointmentSaveFormat | |
import datetime as dt | |
from datetime import timedelta | |
def run(): | |
# Define the working directory. | |
dataDir = "/files" | |
# Initialize an instance of the Mailaddress class with the email address of the sender. | |
fromAddress = MailAddress("from@domain.com") | |
# Create an object of the MailAddressCollection class. | |
attendees = MailAddressCollection() | |
# Invoke the add method to the meail address of the attendee. | |
attendees.add('attendee@domain.com') | |
# Instantiate an instance of the Appointment class to set the date and time of the meeting. | |
app = Appointment("Building HSY 11280", dt.datetime(2018, 5, 27, 22, 12, 11), dt.date(2024, 7, 28), fromAddress, attendees) | |
# Define the meeting summary by setting the value of summary property. | |
app.summary = "Production Meeting" | |
# Set the description of the appointment. | |
app.description = "Discuss for the next round of production" | |
# Call the save method to create an appointment and save it in ISC file format. | |
app.save(dataDir + "AppointmentInICSFormat_out.ics", AppointmentSaveFormat.ICS) | |
#ExEnd: CreateAppointment | |
if _name_ == '__main__': | |
run() |
Output:

ICS File Generator - Get a Free License
You can get a free temporary license to try this appointment making service without evaluation limitations.
Summing up
Toward the end, we went through how to create an appointment in Python programmatically. In addition, we also covered the steps and the code sample to demonstrate the functionality in action. So, this automation will surely benefit your business software in terms of productivity. Moreover, you can navigate through the documentation pages, API references, and the GitHub repository.
Ask a question
You can let us know about your questions or queries on our forum.
Frequently Asked Questions – FAQs
How to make a schedule with Python?
Aspose.Email for Python via .NET provides a robust solution to create appointments in Python. However, you can visit this link to see the answer with a code snippet.