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