Sounds great. Could you add some documentation regarding this feature? You could, for example, start a page called "extending.rst" and explain this concept there including an example.
It will be a great chance for me as well to add a few lines on how to create a new backend. Federico On Monday, May 21, 2018 at 5:29:42 PM UTC+3, Edoardo Putti wrote: > > The patch is from a package using netjsonconfig. > > Take AirOS as an example, I would create a project, netjsonconfig-airos, > import netjsonconfig for the base classes, write my backend + templates > and then write the entry_point attribute in my setup.py to reference my > backend class. > > Then when using netjsonconfig if I want to use the netjsonconfig-airos > backend it's just a pip install away. > > I'll make an example backend soon to provide more reference to how this > works > > Il giorno lunedì 21 maggio 2018 12:15:08 UTC+2, Federico Capoano ha > scritto: >> >> Hi Edoardo, >> >> thanks for the patch. >> >> I'm not 100% sure I fully understood this patch in practice. >> In the pull request you cite a `setup.py` example, but I don't understand >> if that would be the `setup.py` of a python module using netjsonconfig or >> that should be the setup.py of netjsonconfig itself. >> Could you give a full example? >> >> If it's what I think it is, it will most likely need a bit of >> documentation to help users understand how this feature works and how it >> can be used. >> >> Federico >> >> >> >> On Monday, May 21, 2018 at 11:36:39 AM UTC+3, Edoardo Putti wrote: >>> >>> Hello everyone, >>> >>> it's been a long time since 2017 GSOC but I keep reading the digest from >>> the project. >>> >>> Recently I had some time to experiment with python packaging and this is >>> the result applied to netjsonconfig [0]. >>> >>> This change would help integrating with custom backend that the >>> community has been experimenting on that did not get merged upstream [1], >>> [2], [3], [4] or simply >>> make writing a backend simpler without having to touch the original >>> netjsonconfig code. >>> >>> I still don't know if this is the correct way to do this "find backends >>> dinamically" thing so if there are more experienced python packagers please >>> chime in. >>> >>> edoput >>> >>> [0]: https://github.com/openwisp/netjsonconfig/pull/106 >>> [1]: https://github.com/openwisp/netjsonconfig/pull/92 >>> [2]: https://github.com/openwisp/netjsonconfig/pull/91 >>> [3]: >>> https://groups.google.com/forum/#!searchin/openwisp/custom$20backend|sort:date/openwisp/BqHQQ2_TmxE/rXOLB93yBAAJ >>> [4]: >>> https://groups.google.com/forum/#!searchin/openwisp/virtual$20machine|sort:date/openwisp/fOzhr1gQ-Zc/qnZX3zcWAwAJ >>> >> -- You received this message because you are subscribed to the Google Groups "OpenWISP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
