We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just an idea for now, please give some feedback.
I have been thinking about some refactoring where we create new classes for e.g. SpondEvent, SpondPerson, SpondGroup. SpondMessage etc.
It would allow us to keep a stable API even if Spond should change stuff, and do more things in a more consistent way.
Something along the lines of
event = SpondEvent() event.begin = "2023-01-30 13:00:00" event.end = "2023-01-30 17:00:00" event.name = "Race" event.location = SpondLocation(address="Foo Street 123") event.save()
After saving the event, the object is populated with an event.id.
You can change it later:
event = SpondEvent(event_id) event.begin = "2023-01-27 14:00:00" event.save()
There should also be some validations done (start < end etc) before saving.
And similar for persons, messages etc.
person = SpondPerson(person_id) print(person.first_name)
It also allows for creating shortcuts for things like
class SpondPerson(): ... @property def name(self): return f"{self.first_name} {self.last_name}"
The text was updated successfully, but these errors were encountered:
I've actually written a partial implementation of this, as a separate, compatible package for now.
It only covers what I need for my read-only use cases, and I am sure it is naïve in some places. It was largely a learning exercise for me.
It sounds like I should make it public in case it is useful. I will do that in the next few days.
Sorry, something went wrong.
Initial, very partial release: https://github.com/elliot-100/Spond-classes
spond-classes
No branches or pull requests
Just an idea for now, please give some feedback.
I have been thinking about some refactoring where we create new classes for e.g. SpondEvent, SpondPerson, SpondGroup. SpondMessage etc.
It would allow us to keep a stable API even if Spond should change stuff, and do more things in a more consistent way.
Something along the lines of
After saving the event, the object is populated with an event.id.
You can change it later:
There should also be some validations done (start < end etc) before saving.
And similar for persons, messages etc.
It also allows for creating shortcuts for things like
The text was updated successfully, but these errors were encountered: