• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cenobites / flask-jsonrpc / 129
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: feature/github-actions
DEFAULT BRANCH: master
Ran 22 Jul 2020 05:21PM UTC
Jobs 1
Files 13
Run time 6s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
129

push

travis-ci

nycholas
Extract register method

Now you can register a method (function or class method) with alias
`JSONRPC.register(view_func, name='some.name')`.

For example:

```
from flask_jsonrpc import JSONRPC

class MyApp:
    def index(self) -> str:
        return 'Welcome to Flask JSON-RPC'

app = Flask(__name__)
jsonrpc = JSONRPC(app, '/api', enable_web_browsable_api=True)

@jsonrpc.method('subtract')
def subtract(a: int, b: int) -> int:
    return a - b

def hello_default_args(string: str = 'Flask JSON-RPC') -> str:
    return 'We salute you {0}'.format(string)

jsonrpc.register(hello_default_args)

my_app = MyApp()
jsonrpc.register(my_app.index)

app.run(host='0.0.0.0', debug=True)
```

Resolve: #60

122 of 122 branches covered (100.0%)

25 of 25 new or added lines in 2 files covered. (100.0%)

396 of 396 relevant lines covered (100.0%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 129.1 (FLASK_ENV=TESTING) 22 Jul 2020 05:21PM UTC 0
100.0
Travis Job 129.1
Source Files on build 129
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #129
  • 0b92737f on github
  • Prev Build on feature/60-extract-method-register (#126)
  • Next Build on feature/60-extract-method-register (#130)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc