Comments (1)
Hi @frederikbrammer, thanks for your message.
The library is not designed to work in this way, although it would make total sense to do what you're proposing. A great solution would be to actually update the library to support this kind of behaviour. You'd probably have to inherit from a base class and then push actions would result in object method calls (and decorators would not be needed). Unfortunately I don't have time to spend on that so it will not be part of the library (although I'd accept contributions).
The way I've solved similar issues in the past is to have global functions decorated accordingly (just like in the code examples) and then have these global functions call methods from a singleton object instance of what would be your PushService
class. It is a bit ugly but it works.
If you'd like to contribute a solution like this and make it generic enough to include it in the library I'd be happy to include it as well.
Thanks!
from push2-python.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from push2-python.