Pubnub-python-tools

Latest version: v1.1.4

Safety actively analyzes 622275 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.1.4

New Features

* Added `--stop-on-fail` functionality. Works with multi-publish multi-message.
* Added `-regex,--regex-acl`. Transform regex patterns to PubNub regex patterns.

**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.1.3...v1.1.4

1.1.3

General

- Overrided argsparse class
- Updated test cases
- Better logic for main_app
- Added multi message and multi channel publish

**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.1.0-d...v1.1.3

v1.1.0-d
Re-release, updating GH actions.

1.1.0

General

Hackathon release version `v1.1.0`.

New Use Cases

- `it_cache_busting.py`: Include cache busting test cases. Dependencies: `pytest` , `flaky`.
- here_now multiple channels

it_cache_busting

Flaky for retrying of tests.

here_now multiple channels

Updated `-here` to work with multiple channels:

Subscribe to multiple channels using presence and call `- here` on them:


pubnub-python-tools -here "test.channel,test.channel.2"



result: HereNow Result total occupancy: 4, total channels: 2
{'here_now_channels': ['test.channel', 'test.channel.2'], 'here_now_occupancy': [3, 1], 'here_now_uuids': ['UUID1'], 'here_now_states': [None]}


Maintenance

- CLI unsubscribes - More reliable.
- Herenow - Bug fixes. Cache busting tests.
- Coverage - Updated coverage.
- Scripts - `build_install.sh` using dynamic version from `__about__.py`.

Bug Fixing

Multiple channel `HereNow` Fix

There was an odd error with here_now when calling multiple channels on both the `sync` and `async` implementations. The root cause was that the custom `here_now` callback had a field that was generated once the callback's done, but because the tests were calling the same callback instance, some were already trying to evaluate the callback's result when there was none yet.

The solution was to remove the PubNub instances from within the test function creation to the module level so all the tests within that file use the same server. That gives more control on the sequence of events that can be called from within the test. Also had to add a try/except of the `sync` implementation.

Even though this is a valid solution, this is taking advantage of the package `flaky` that allows you to retry the test case a number of times and other shannanigans. I think this is a modern way to test this kind's of systems, but not as sharp as using unittests, which the cache busting scenario still doesn't have.

**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.0.0.1...v1.1.0

1.1.0c

Changed repository on GitHub actions.

1.1.0a

General

Production deployment to Pypi due to [test.pypi](https://test.pypi.org/legacy/) being down.

Hackathon release version `v1.1.0`.

New Use Cases

- `it_cache_busting.py`: Include cache busting test cases. Dependencies: `pytest` , `flaky`.
- here_now multiple channels

it_cache_busting

Flaky for retrying of tests.

here_now multiple channels

Updated `-here` to work with multiple channels:

Subscribe to multiple channels using presence and call `- here` on them:


pubnub-python-tools -here "test.channel,test.channel.2"



result: HereNow Result total occupancy: 4, total channels: 2
{'here_now_channels': ['test.channel', 'test.channel.2'], 'here_now_occupancy': [3, 1], 'here_now_uuids': ['UUID1'], 'here_now_states': [None]}


Maintenance

- CLI unsubscribes - More reliable.
- Herenow - Bug fixes. Cache busting tests.
- Coverage - Updated coverage.
- Scripts - `build_install.sh` using dynamic version from `__about__.py`.

Bug Fixing

Multiple channel `HereNow` Fix

There was an odd error with here_now when calling multiple channels on both the `sync` and `async` implementations. The root cause was that the custom `here_now` callback had a field that was generated once the callback's done, but because the tests were calling the same callback instance, some were already trying to evaluate the callback's result when there was none yet.

The solution was to remove the PubNub instances from within the test function creation to the module level so all the tests within that file use the same server. That gives more control on the sequence of events that can be called from within the test. Also had to add a try/except of the `sync` implementation.

Even though this is a valid solution, this is taking advantage of the package `flaky` that allows you to retry the test case a number of times and other shannanigans. I think this is a modern way to test this kind's of systems, but not as sharp as using unittests, which the cache busting scenario still doesn't have.

**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.0.0.1...v1.1.0

v.1.1.0-b
General

Production deployment to Pypi due to [test.pypi](https://test.pypi.org/legacy/) being down.

Hackathon release version `v1.1.0`.

New Use Cases

- `it_cache_busting.py`: Include cache busting test cases. Dependencies: `pytest` , `flaky`.
- here_now multiple channels

it_cache_busting

Flaky for retrying of tests.

here_now multiple channels

Updated `-here` to work with multiple channels:

Subscribe to multiple channels using presence and call `- here` on them:


pubnub-python-tools -here "test.channel,test.channel.2"



result: HereNow Result total occupancy: 4, total channels: 2
{'here_now_channels': ['test.channel', 'test.channel.2'], 'here_now_occupancy': [3, 1], 'here_now_uuids': ['UUID1'], 'here_now_states': [None]}


Maintenance

- CLI unsubscribes - More reliable.
- Herenow - Bug fixes. Cache busting tests.
- Coverage - Updated coverage.
- Scripts - `build_install.sh` using dynamic version from `__about__.py`.

Bug Fixing

Multiple channel `HereNow` Fix

There was an odd error with here_now when calling multiple channels on both the `sync` and `async` implementations. The root cause was that the custom `here_now` callback had a field that was generated once the callback's done, but because the tests were calling the same callback instance, some were already trying to evaluate the callback's result when there was none yet.

The solution was to remove the PubNub instances from within the test function creation to the module level so all the tests within that file use the same server. That gives more control on the sequence of events that can be called from within the test. Also had to add a try/except of the `sync` implementation.

Even though this is a valid solution, this is taking advantage of the package `flaky` that allows you to retry the test case a number of times and other shannanigans. I think this is a modern way to test this kind's of systems, but not as sharp as using unittests, which the cache busting scenario still doesn't have.

**Full Changelog**: https://github.com/sergio-munoz/pubnub-python-tools/compare/v1.0.0.1...v1.1.0

1.0.0.1

pubnub-python-tools V1
[![Python application](https://github.com/sergio-munoz/pubnub-python-tools/actions/workflows/python-app.yml/badge.svg)](https://github.com/sergio-munoz/pubnub-python-tools/actions/workflows/python-app.yml) [![Upload Python Package](https://github.com/sergio-munoz/pubnub-python-tools/actions/workflows/python-publish-testing.yml/badge.svg)](https://github.com/sergio-munoz/pubnub-python-tools/actions/workflows/python-publish-testing.yml) [![ghlastcommit](https://img.shields.io/github/last-commit/sergio-munoz/pubnub-python-tools?style=flat-square)](https://img.shields.io/github/last-commit/sergio-munoz/pubnub-python-tools?style=flat-square)


Introduction
____

Quickly interact with PubNub using the Python SDK. Check out the full `README.md`.

Features
_____

V1 has limited features:

* subscribe
* publish
* presence
* here_now

There is Async support but it's not accessible even though the parameter is active.

Common Usage
-----

Subscribe in one terminal:

shell
$ pubnub-python-tools -s "MySpace1"


Publish from another terminal:

shell
$ pubnub-python-tools -p "MySpace1" -m "My awesome message 1"


You'll see the message contents on the first terminal.

Install with pip
--------

Currently on `test.pypi.org`.

shell
$ python -m pip install -i https://test.pypi.org/simple/ pubnub-python-tools


Change Log
___

[this]
* re-released v1
* updated readme

[old]
* bumped version to use hatch CI/CD
* added hatch
* moved code to `src/`
* added wrapper to main in `run/__init__.py`

Solved Issues
____

None


Test Changes
___

None

Next Steps
----

* Raise coverage
* Incorporate more PubNub products
* Develop a project or a time-release estimate for this project
* Use to demonstrate cache busting

More Info
_____

Currently only the README.md is available. Create issues for requests.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.