Skip to content

Parse port from base url #2110

@jonburdo

Description

@jonburdo

Is your feature request related to a problem? Please describe.

I would like to be able to pass the base url for the server including the port as a single string. This is helpful if I have this string in a variable and want to pass it through rather than splitting it apart to separate the port.

Instead of having to specify the port separately

registry = ModelRegistry(
    server_address="http://localhost",
    port=9000,
    is_secure=False
)

I would like to be able to include it in the url

registry = ModelRegistry(
    server_address="http://localhost:9000",
    is_secure=False
)

Describe the solution you'd like

The two examples above should be treated the same.

If the port kwarg is specified and a port is given in server_address at the same time this should probably cause an error.

Describe alternatives you've considered

--

Additional context

--

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions