Skip to main content

API for Urban Rivals collection management

Project description

A module to support reading player purchase history data and storing it in a database.

Basic Use:
  1. Import api from urcollectionmanager

  2. Create a request.Session and pass it, along with your credentials to session_connect_to_ur

  3. Pass that same session (now authenticated) to get_purchase_history along with the number of pages to scrape.

  4. Pass the result to convert_purchase_history

    Optionally: Pass result to your own HTML parser.

  5. You now have a list of Purchase objects that contain all relevant information available from the purchase history page.

Database Use:
  1. Run connect_and_initialize_database if you have a particular database location you want to connect to. By default this will connect to data/collection.sqlite

  2. Pass a list of Purchase objects to write_history_to_database

    If using convert_purchase_history, you will need to flatten the list of lists

  3. Once the database has Purchase objects in it, you can run get_history_from_database to retrieve them.


How To Use Tools:
  • To run the project (preferably configure venv first)
>>> poetry install
  • To configure your venv
>>> python -m venv /path/to/new/virtual/environment
>>> poetry env info
  • If env info does not match your path, try manually running Scripts/activate inside that environment
  • To add a dependency (add a -D if it’s only for development)
>>> poetry add <dependency>
>>> git add
>>> cz c
  • More options can be found under options under Commitizen
Update .pre-commit-config.yaml, then run
>>> pre-commit install
>>> pre-commit run --all-files


Not Required at this Time:

Project details

Download files

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

Files for urcollectionmanager, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size urcollectionmanager-1.0.1-py3-none-any.whl (8.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size urcollectionmanager-1.0.1.tar.gz (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page