Extensible?
A general question to ask -
The idea is very nice. And I touched this repo 3 months back. I am having a relook. And probably recollecting the things here?
The project is very nice but if I am not wrong there is no way I can add my own middleware in middleware directory like for example
from toolz import merge
from ..formation import _REQ_HTTP
def auth(auth_key=None, access_token=None, content_type='application/json'):
def auth_middleware(ctx, call):
req = ctx.get(_REQ_HTTP)
req.headers = merge(req.headers, {
'auth_key': auth_key,
'access_token': access_token,
'content-type': content_type
})
return call(ctx)
return auth_middleware
And then changing the below file too like
formation/middleware/init.py
from .auth import auth # noqa
So far so good but then I will have bump up the version
formation/version.py
OR raise a PR.
This method / process doesn't seem a lot extensible. Is the extensibility thing missing? Or is there workaround on the release thing? Can I fork and and release it some other name
May be a newbie question or I misunderstood something. I want to release a bit of functionality. like the auth above and playing with https://pypi.org/project/py-zipkin/ integration. Have 2 -3 ideas in mind, really want to explore. Will that be ok?
Or need your guidance (sorry for newbie question)
Also @jondot @AvnerCohen @cdambo
https://pypi.org/project/py-zipkin/ is good integration in the client middleware (the purpose of formation) like you have described?
Is there some https://pypi.org/project/py-zipkin/ + formation integration in the wild, maybe not?? Or has this thought crossed anyone's mind?
A general question to ask -
The idea is very nice. And I touched this repo 3 months back. I am having a relook. And probably recollecting the things here?
The project is very nice but if I am not wrong there is no way I can add my own middleware in middleware directory like for example
from toolz import merge from ..formation import _REQ_HTTP def auth(auth_key=None, access_token=None, content_type='application/json'): def auth_middleware(ctx, call): req = ctx.get(_REQ_HTTP) req.headers = merge(req.headers, { 'auth_key': auth_key, 'access_token': access_token, 'content-type': content_type }) return call(ctx) return auth_middlewareAnd then changing the below file too like
formation/middleware/init.py
from .auth import auth # noqaSo far so good but then I will have bump up the version
formation/version.py
OR raise a PR.
This method / process doesn't seem a lot extensible. Is the extensibility thing missing? Or is there workaround on the release thing? Can I fork and and release it some other name /formation-clone with your @jondot permission of course. I am asking permission here.
May be a newbie question or I misunderstood something. I want to release a bit of functionality. like the auth above and playing with https://pypi.org/project/py-zipkin/ integration. Have 2 -3 ideas in mind, really want to explore. Will that be ok?
Or need your guidance (sorry for newbie question)
I came to the same position, thinking to use it for auth in my request client and I was checking, but it seems there's no activity behind, pity though, as it seems a nice project.