Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.
/ allecena Public archive

A tool for statistical analysis and tracking of the most popular polish online auction system allegro.pl

License

Notifications You must be signed in to change notification settings

rikkt0r/allecena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlleCena


What am I looking at?

This is AlleCena, abbreviated from Polish 'Ale cena'(what a price!). It's a tool for statistical analysis and tracking of the most popular Polish online auction system allegro.pl

Awarded in 2015 during BrainCode Mobi 2015 as the best application in category 'Allegro'

Application features:

  • price evaluation at which user should sell a desired item
  • sell probability estimation
  • price trends chart
  • auction characteristics - points out most important auction characteristics boosting sell success
  • auction tracking ie. periodical checks of auction state and user notification
  • basic statistical data

And all the above, given just user account and scarce information like item name and whether was it used or does it have a warranty

PROJECT IS DEAD

Ok, so... Allegro is dropping support for Soap API on 26.10.2020

TBH there's too much refactoring etc to be done to make it work again,

no-one cares, so it's not worth the effort.

@ ac_engine_allegro.data.data_grabber.NewClient just a glimpse of what might have come,

anyway, docker config wasn't finished, code is 5 year old,

have a good day ;)

//rikkt0r

Authors

Main authors:

Initally helped out with the project:

  • Grzegorz Gurgul
  • Natalia Stawowy
  • Kamil Kopczyk

Tech

  • Any relational database
  • Django & Django Rest Framework
  • Celery & RabbitMQ
  • Memcache | Redis

Environment preparation

Gentoo

echo "dev-python/python sqlite" >> /etc/portage/package.use/python
emerge -avuDN @system
emerge -av dev-python/pip dev-python/virtualenv virtual/lapack virtual/cblas net-misc/rabbitmq-server net-misc/memcached dev-libs/libmemcached
rabbitmq-plugins enable rabbitmq_management

git clone https://rikkt0r@bitbucket.org/rikkt0r/allecena.git
cd allecena
virtualenv -p /usr/bin/python2.7 env
. env/bin/activate
pip install -r requirements.txt

Debian/[...]buntu

aptitude install python-distlib python-setuptools python-dev liblapack3 liblapacke liblapacke-dev libatlas-base-dev gfortran libblas-common libblas3 g++ libyaml-dev rabbitmq-server memcached libmemcached-dev libjpeg-dev zlib1g-dev
rabbitmq-plugins enable rabbitmq_management
easy_install pip virtualenv
git clone https://rikkt0r@bitbucket.org/rikkt0r/allecena.git
cd allecena
virtualenv -p /usr/bin/python2.7 env
. env/bin/activate
pip install -r requirements.txt

OSX

sudo brew install rabbitmq memcached
rabbitmq-plugins enable rabbitmq_management
pip install virtualenv
git clone https://rikkt0r@bitbucket.org/rikkt0r/allecena.git
cd allecena
virtualenv -p /usr/bin/python2.7 env
. env/bin/activate
pip install -r requirements.txt

Queue overview

http://localhost:15672

User and permissions at rabbitMq

rabbitmqctl add_user allecena allecenaPassword
rabbitmqctl add_vhost allecena
rabbitmqctl set_permissions -p allecena allecena ".*" ".*" ".*"

rabbitmqctl delete_user guest
rabbitmqctl add_user rikkt0r rikkt0rPassword
rabbitmqctl set_permissions -p allecena rikkt0r ".*" ".*" ".*"
rabbitmqctl set_permissions -p / rikkt0r ".*" ".*" ".*"
rabbitmqctl set_user_tags rikkt0r administrator

Before running

Create app/local_settings.py from app/local_settings.py.template and fill the following variables:

  • ALLEGRO_PASSWORD_HASH
  • ALLEGRO_KEY
  • ALLEGRO_LOGIN

Running in debug

. env/bin/activate
# if run for first time
# creates database
python app/manage.py migrate
# loads test user (test@allecena.com / qwerty) and auction categories
python app/manage.py loaddata categories.yaml users.yaml
# endif

# three separate instances
python app/manage.py celeryd --verbosity=2 --loglevel=DEBUG -c 8
python app/manage.py celerybeat --verbosity=2 --loglevel=DEBUG
python app/manage.py runserver

# btw. api docs are available on /docs

Deploy

What you do with our code is up to you. Anyway, if you plan to deploy it we recommend the following: (example configs are available in top level directory deploy/)

  • Host base application using Apache + mod_wsgi
  • Use any relational database django supports ex. postgres, mysql
  • Install RabbitMQ and apply required permissions
  • Spawn Celeryd workers using supervisor
  • Keep CeleryBeat alive also using supervisor
  • Install Memcache or Redis as celery result backend

Additional commands

python app/manage.py clear_cache
python app/manage.py allegro_print_countries
python app/manage.py allegro_update_categories

TODO

  • Migrate to Docker (not finished)
  • Mention bearer-token-for-application flow
  • Tests :-)
  • Create grabber and container for Ebay (fill ac_engine_ebay)
  • Denormalize TriggerValues table
  • Create a backend for country choosing (new db table & mainly config propagation to grabbers)
  • Translations

About

A tool for statistical analysis and tracking of the most popular polish online auction system allegro.pl

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published