Skip to content
New issue

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

Add Context argument annotation #155

Merged
merged 8 commits into from
Apr 4, 2019
Merged

Add Context argument annotation #155

merged 8 commits into from
Apr 4, 2019

Conversation

prkumar
Copy link
Owner

@prkumar prkumar commented Apr 1, 2019

Fixes #143.

The Context annotation can be used to pass data to middleware implemented as a MethodAnnotation, like the cache decorator that @kaidokert proposed on gitter.

Attention: @prkumar

@codecov
Copy link

codecov bot commented Apr 2, 2019

Codecov Report

Merging #155 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #155   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          41     41           
  Lines        2122   2149   +27     
  Branches      167    172    +5     
=====================================
+ Hits         2122   2149   +27
Impacted Files Coverage Δ
uplink/arguments.py 100% <100%> (ø) ⬆️
uplink/helpers.py 100% <100%> (ø) ⬆️
uplink/clients/io/execution.py 100% <100%> (ø) ⬆️
uplink/session.py 100% <100%> (ø) ⬆️
uplink/builder.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 472c28d...cd4b439. Read the comment docs.

@prkumar prkumar merged commit 0d29483 into master Apr 4, 2019
@prkumar prkumar added this to the v0.9.0 milestone May 11, 2019
@prkumar prkumar mentioned this pull request Jun 5, 2019
@prkumar prkumar deleted the v0.9.0/context branch June 7, 2019 01:11
@HarvsG
Copy link

HarvsG commented Jun 24, 2021

Is there a working version of this cache decorator in the wild now @kaidokert @prkumar?

@kaidokert
Copy link

I haven't touched it recently, but i was using it in a small MovieDB API wrapper a while ago: https://pastebin.com/YXk1nrgR

No guarantee's it'll run,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass context objects to MethodAnnotation decorators at runtime
3 participants