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

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

Build:
Build:
LAST BUILD BRANCH: feature/github-actions
DEFAULT BRANCH: master
Ran 22 Jul 2020 05:26PM UTC
Jobs 1
Files 13
Run time 5s
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
130

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%)

26 of 26 new or added lines in 3 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 130.1 (FLASK_ENV=TESTING) 22 Jul 2020 05:26PM UTC 0
100.0
Travis Job 130.1
Source Files on build 130
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #130
  • 1ac1aa85 on github
  • Prev Build on feature/60-extract-method-register (#129)
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