Skip to content

Commit

Permalink
Bump version to 0.8.1; update CHANGELOG for new version; README reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
elliot-100 committed May 3, 2024
1 parent 5efbba1 commit 2436f1e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 33 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe
Historic and pre-release versions aren't necessarily included.


## [UNRELEASED] - TBC
## [0.8.1] - 2024-05-03

### Added

- Support for Python 3.12 in GitHub CI

### Changed

- Refactors; test improvements

- Use `ruff format` instead of `isort` + `black` in CI/pre-commit

- Update dev/test dependencies: mypy, pre-commit-hooks, pytest, ruff, types-python-dateutil
Expand Down Expand Up @@ -68,6 +70,7 @@ Historic and pre-release versions aren't necessarily included.
- Update dev/test dependencies: ruff


[0.8.1]: https://github.com/elliot-100/Spond-classes/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/elliot-100/Spond-classes/compare/v0.7.3...v0.8.0
[0.7.3]: https://github.com/elliot-100/Spond-classes/compare/v0.7.2...v0.7.3
[0.7.2]: https://github.com/elliot-100/Spond-classes/compare/v0.7.1...v0.7.2
61 changes: 30 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,36 @@ Or if you're using Poetry:
poetry add spond-classes
`

## Example code

Adapting the example code in [`Spond`](https://github.com/Olen/Spond/) README:

```
import asyncio
from spond import spond
import spond_classes
username = 'my@mail.invalid'
password = 'Pa55worD'
group_id = 'C9DC791FFE63D7914D6952BE10D97B46' # fake
async def main():
s = spond.Spond(username=username, password=password)
group_data = await s.get_group(group_id)
await s.clientsession.close()
# Now we can create a class instance ...
group = spond_classes.Group.from_dict(group_data)
# ... use class properties instead of dict keys ...
print(group.name)
# ... and access child instances and their properties
for member in group.members:
print(member.full_name)
asyncio.run(main())
```
## Key features

* Create `Group` class instance from the dict returned by the corresponding `spond`
Expand Down Expand Up @@ -89,34 +119,3 @@ Event.unconfirmed_uids: list

It's also possible to create `Member.from_dict()`, `Role.from_dict()`,
`Subgroup.from_dict()`.

## Example code

Adapting the example code in [`Spond`](https://github.com/Olen/Spond/) README:

```
import asyncio
from spond import spond
import spond_classes
username = 'my@mail.invalid'
password = 'Pa55worD'
group_id = 'C9DC791FFE63D7914D6952BE10D97B46' # fake
async def main():
s = spond.Spond(username=username, password=password)
group_data = await s.get_group(group_id)
await s.clientsession.close()
# Now we can create a class instance ...
group = spond_classes.Group.from_dict(group_data)
# ... use class properties instead of dict keys ...
print(group.name)
# ... and access child instances and their properties
for member in group.members:
print(member.full_name)
asyncio.run(main())
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "spond-classes"
version = "0.8.0"
version = "0.8.1"
description = "Experimental Python class abstraction layer for `spond` package."
authors = ["elliot-100 <3186037+elliot-100@users.noreply.github.com>"]
readme = "README.md"
Expand Down

0 comments on commit 2436f1e

Please sign in to comment.