Skip to content

move __version__ and user_agent to library-level constants to improve performance #258

Closed
@jreiberkyle

Description

@jreiberkyle

Consider raising _get_user_agent() to a class or module-level constant instead of a non-public static method for UX as well as performance.

Originally posted by @ericrdunham in #240 (comment)

Jen comments: I like this suggestion. I don't like having to update the user agent to stay up to date with the version. I am not sure I really like the pattern of having a module called __version__.py that basically holds a constant, __version__ = 'blah'.

Possible implementation

add lines to constants.py:

VERSION = 'blah'
USER_AGENT = 'planet_client_python/' + VERSION

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions