Skip to content

Commit fd025b9

Browse files
author
rightlag
committed
Update README.md
1 parent a821cfc commit fd025b9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,25 @@ Released: 2-Sep-2015
99
# Introduction
1010

1111
timely is a Python package that allows users to manage the uptime of their [Amazon Web Services](https://aws.amazon.com/) EC2 containers by providing times at which the containers should be running for any day of the week.
12+
13+
# Code Samples
14+
15+
### Fetch all containers and their times
16+
17+
>>> from timely import Timely
18+
>>> timely = Timely()
19+
>>> timely.all()
20+
{u'i-6dc5bc92': [('Monday', '09:00', '17:00'), ('Tuesday', '09:00', '17:00'), ('Wednesday', '09:00', '17:00')]}
21+
22+
### Set times for all containers during certain days of the week
23+
24+
>>> from timely import Timely
25+
>>> timely = Timely()
26+
>>> timely.set(weekdays=['Monday', 'Tuesday', 'Wednesday'], start_time='9:00 AM', end_time='5:00 PM')
27+
28+
### Check if container should be running
29+
30+
>>> from timely import Timely
31+
>>> timely = Timely(verbose=True)
32+
>>> timely.check()
33+
Stopping instance: i-6dc5bc92

0 commit comments

Comments
 (0)