From 9bb0d83b025a7ab2be1ccd8530b4bdc9a8c46e4e Mon Sep 17 00:00:00 2001 From: Brian Wiborg Date: Sun, 2 Apr 2023 16:48:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..02c1238 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Python-Voting + +A Python 3.11 module for votings on the c-base space-station. + +## Usage + +```python +from voting.voting import QuorumKind, Quorum, Vote, Voting + +# initializing a new voting +voting = Voting( + title="TITLE", + quorum=Quorum(), + #quorum=Quorum(kind=QuorumKind.ABSOLUTE, value=42), + #quorum=Quorum(kind=QuorumKind.PERCENT, value=42.0), + voters=['alice', 'bob'], +) + +# starting the voting +voting.start() + +# placing a vote +voting.vote('alice', Vote.NO) + +# overwrite an existing vote +voting.vote('alice', Vote.YES) + +# obtaining the result +res = voting.result() +print(res) +``` \ No newline at end of file