-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepo.py
More file actions
24 lines (21 loc) · 808 Bytes
/
repo.py
File metadata and controls
24 lines (21 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class Repo():
"""Repository"""
def __init__(self, name, owner, stars, repository, created, updated, description):
self.name = name
self.owner = owner
self.stars = stars
self.repository = repository
self.created = created
self.updated = updated
self.description = description
def print_summary(self):
print(f"Name: {self.name}")
print(f"Owner: {self.owner}")
print(f"Stars: {self.stars}")
print(f"Repository: {self.repository}")
print(f"Created: {self.created}")
print(f"Updated: {self.updated}")
print(f"Description: {self.description}")
return True
def get_attributes(self):
return {attribute.capitalize(): value for attribute, value in self.__dict__.items()}