Skip to main content

simple realisation of cross-reference grouping algorithm; mostly used in event driven distributed systems

Project description

description

goal

the project aims to provide simple to use events cross-referencing engine

cases of usage

suppose you have users in database and you want to collect information on their visits to some pages; you use a third-party organisation for this end; you construct an API to accept visit events from your partner; this third-party partner knows nothing (and he should not) about your users database ID; in case of someone visiting page this partner marks him with cookie and sends event to your API containing cookie as an identificator;

here comes the problem of matching third-party identificators with your internal ones;

assumptions

users table in your database has columns with third party identificators

  • for this to hold you should have some internal events (like registration) which can enrich user profiles with third-party identificator

basic case

you have a set of events from third party along with events for grouping (which has database ID) from your database

let's look at basic case where user registered at your service and visited some pages; registration event provided the same cookie which third party used for this used identification; we have the following events incoming to the algorithm

db_id cookie event_id
123 "nice_page_visitor" --
-- "nice_page_visitor" 1
-- "nice_page_visitor" 2

this incoming configuration will produce the following result (pseudocode)

{db_id: { 
    123: {
        cookie: {
            "nice_page_visitor":[
                event1,
                event2,
            ]
        }
    }
}}

we successfully matched events from third-party with our internal identificator therefore enriched our users profile;


python version

>=3.6

logging

this package has default logging that uses configuration you provided in your application; for more info see this extract from official logging doc

contribution

feel free to PR or create issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygrouper-1.0.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

pygrouper-1.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pygrouper-1.0.4.tar.gz.

File metadata

  • Download URL: pygrouper-1.0.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.5

File hashes

Hashes for pygrouper-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8e7b5058b9704947a8c53c10b1dc7bda3583f4f6391345efb8b326fea06eb2b1
MD5 d1ae0e327d30a8b17eeceaa5934e1c18
BLAKE2b-256 5b67e703ee8cfb3bae519cdbd88655ca8ce1b21be1599fa7040f364bf5fb01f6

See more details on using hashes here.

File details

Details for the file pygrouper-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pygrouper-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.1 CPython/3.7.5

File hashes

Hashes for pygrouper-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fb2e8a22fe69115056839a0568bc3d664597e9fdc187d00dfb61180e0c472f9b
MD5 dbeb68960f1a38ba31294715a008aad9
BLAKE2b-256 18ecd73f87870bad3e7bcc7fcfc952f696720a7958485da1b6dc7b868647918d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page