Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

**django-channels-presence2**

Simple presence boilerplate for django-channels 2 and channel redis backend.

**Installation**

`pip install django-channels-presence2`

**Usage**

Create presence for consumer:

`self.presence = await ChannelPresence.create_from_consumer(self, groups=(PUBLICATIONS_SCHEDULE_GROUP,))`

Example of create:

`class Consumer(AsyncJsonWebsocketConsumer):
async def connect(self):
self.presence = await ChannelPresence.create_from_consumer(self, groups=(CONSUMER_GROUP,))`

Groups are needed to send join and leave messages.
Learn more about groups: http://channels.readthedocs.io/en/latest/topics/channel_layers.html?highlight=group_send.

Join user:

`await self.presence.join()`

Leave user:

`await self.presence.leave()`

Get users:

`await self.presence.get_users(GROUP)`

Return:

`{
'user': SimpleLazyObject of User,
'is_active': True or False
'present_at': Datetime
}`

To set the activity expired time use `EXPIRED_USER_ACTIVITY` in django settings.

Metadata

Release files for django-channels-presence2 0.0.4a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-channels-presence2 0.0.4a0
File Size Uploaded Provenance
django-channels-presence2-0.0.4a0.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-channels-presence2 0.0.4a0
File Interpreter ABI Platform
django_channels_presence2-0.0.4a0-py3-none-any.whl Python 3 none any Details

Total release size: 7.5 kB

Release files / django-channels-presence2-0.0.4a0.tar.gz

Download URL django-channels-presence2-0.0.4a0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c0f13715b6132b6a1df286aaad83c267f1ba9c3753e69a3631a11b443bb6a401
BLAKE2b-256 checksum
How to use checksums
fcb27eea01b596eca94c30adefea53daf06080f6d122394f5c05404d31c2dabf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_channels_presence2-0.0.4a0-py3-none-any.whl

Download URL django_channels_presence2-0.0.4a0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ada1e92d692f780191ab9332c543fba8754a816d96a98523fb04fce79f59958
BLAKE2b-256 checksum
How to use checksums
2fe177c1f82cc5c573c893ee671794a3eb764c7ba3efb10f66a1a6d473a9f756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-channels-presence2 0.0.4a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page