Public 360 application by Tieto has some issues with for example duplicated contacts. This package tries to fix that and adds other functionality like synchronization(enrichment) with brreg.no.
Project description
P360 Contact Manager
Why
While there are built in methods to syncronize against for example brønnøysundregisteret, to enrich data or update data they are slow and point and click oriented. There are also cases where duplicates are created by external programs. This program tries to fix some of those issues.
How
P360 exposes an API for dealing with contacts. It is through this api that we find, update, and fix enterprises in p360.
Setup
easier setup will be available if the package goes to pypi. Then it would be as simple as doing pip install p360-contact-manager and use it directly like:
$ python p360_contact_manager args args action
But for now we install it from source. so clone the repo first. then:
Get poetry
get poetry - dependency management:
$ curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
Make poetry create virtualenv in project folder. This makes it easier for IDE's to run correct virtualenv while debuging/running linters etc.
$ poetry config settings.virtualenvs.in-project true
Get Pyenv - optional
pyenv is a nice tool that lets you 'activate' a version of python either globally, locally or for one shell instance. its really nice and i reccomend getting it and using it now but it is not needed for this program to work.
with brew:
$ brew update
$ brew install pyenv
Put this command into the of ~/.bash_profile
or run pyenv init
to make sure where to put it for for example zsh.
$ eval "$(pyenv init -)"
install a version of python 3.7.2+: This installs a clean python to pyenvs folders and lets us reference that as a 'base' in our virtualenvs.
$ pyenv install 3.7.4
Usage
if you did install pyenv activate pyenv for the current shell
$ pyenv shell 3.7.4
Run this to install required packages and a virtualenv
- if you do not plan on developing on this, add the flag: --no-dev
$ poetry install
Test
$ poetry run python p360_contact_manager --authkey the_key test
Create a 'Cache'(json file) of all enterprises in p360
poetry run python p360_contact_manager --authkey the_key cache_enterprises
add -c or --cached argument to use local cached json file.
Create duplicate worklist
poetry run python p360_contact_manager --authkey the_key duplicates -c
Update with worklist
tip: use --dry to check if everything looks good before continuing
$ poetry run python p360_contact_manager --authkey the_key update --worklist json_worklist_file.json
Create Brreg data syncronize worklist
for now just add the key even though its not needed its flagged as required... will fix.
$ poetry run python p360_contact_manager --authkey the_key brreg_syncronize
Call synchronize with brreg data worklist
$ poetry run python p360_contact_manager --authkey the_key synchronize --worklist brreg_synchronize_worklist.json
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
Built Distribution
Hashes for p360-contact-manager-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73e039b3c70081dafb1f64043598621a379b97bbdee80a5a7c7ee16a029ff1f1 |
|
MD5 | bdaf1efe45b6b3d27183e7c92ddc70f5 |
|
BLAKE2b-256 | 953444c5cea6b896155717f391e6c2ec68f8bc1847aab5ad23782b59bd45a854 |
Hashes for p360_contact_manager-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ee23dfe0451124adabb75b46d6374cab11e332f4592bc9b7e36d4c3a478b040 |
|
MD5 | 858b8fbc44a6ac9a1084c9e2895444aa |
|
BLAKE2b-256 | cd862604a40021116bd8bf09cce30bb638f841bac3785bf261cda878cbeb2569 |