Skip to content

Conversation

@JanluOfficial
Copy link

This commit changes the __init__ method of PNConfiguration() to optionally allow the developer to set subscriber_key, publish_key and uuid during initialization instead of setting them post-init. This lets developers initialize their PNConfiguration in one line, as opposed to the 4 lines it took previously, as shown currently by the official pubnub documentation.

image

@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Jan 22, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@JanluOfficial JanluOfficial changed the title [Improvement] Letting the developer set subscriber_key, publish_key and uuid for PNConfiguration during initialization [Improvement] Letting the developer initialize subscriber_key, publish_key and uuid for PNConfiguration during initialization Jan 22, 2026
@stephenlb
Copy link
Member

This looks safe, and backward compatible. It's pythonic and supports user initializing the config easily at instantiation. Allows end-user code reduction. I wonder if there is a way to use **kwargs to support member assignment at init()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants