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 type inference #1

Open
dfurtado opened this issue May 23, 2017 · 0 comments
Open

Add type inference #1

dfurtado opened this issue May 23, 2017 · 0 comments

Comments

@dfurtado
Copy link
Owner

Parameters passed through the route URI are always resolved as str. It would be much cleaner if the framework could convert the str values to the correct types, using as reference the value place holders in the route definition.

For example, let's say we have the following route:

@get('/api/user/{int:id}')
def getuser(self, id):
    pass

The id will be type str even though it has been specified that the type of the parameter is int.

The framework supports adding str and int parameters to the route URI so that would be a good start when implementing type inference.

@dfurtado dfurtado self-assigned this May 23, 2017
@dfurtado dfurtado added this to the Release 1.0.0 milestone May 29, 2017
@dfurtado dfurtado removed their assignment Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant