Skip to main content

Buybacks for Alliance Auth

This is a buyback program management app for Alliance Auth (AA).

License python django

Contents

  1. Key Features
  2. Installation
    1. Install app
    2. Update Eve Online app
    3. Configure AA settings
    4. Finalize installation into AA
    5. Data import
    6. Setup permissions
    7. Setup corp
    8. Define programs
    9. Calculating
  3. Updating
  4. Tips & Tricks
  5. TODO

Overview

This app helps running buyback programs for an alliance or corporation.

Key Features

It offers the following main features:

  • Manage corporation buyback programs
  • Calculate value of the items that will be sent to the buyback program
  • Store statistics on the usage of buyback programs

Installation

Install app

Install into your Alliance Auth virtual environment from PyPI:

pip install aa-buybacks2

Update Eve Online app

Update the Eve Online app used for authentication in your AA installation to include the following scopes:

esi-universe.read_structures.v1
esi-contracts.read_corporation_contracts.v1
esi-assets.read_corporation_assets.v1

Configure AA settings

Configure your AA settings (local.py) as follows:

  • Add 'eveuniverse' and 'buybacks' to INSTALLED_APPS

  • Add these lines to bottom of your settings file:

    # settings for buybacks2
    CELERYBEAT_SCHEDULE["buybacks_update_all_offices"] = {
        "task": "buybacks2.tasks.update_all_offices",
        "schedule": crontab(minute=0, hour="*/12"),
    }
    CELERYBEAT_SCHEDULE["buybacks_sync_all_contracts"] = {
        "task": "buybacks2.tasks.sync_all_contracts",
        "schedule": crontab(minute=0, hour="*"),
    }
    

Finalize installation into AA

Run migrations & copy static files

python manage.py migrate
python manage.py collectstatic

Restart your supervisor services for AA

Data import

Load EVE Online type data from ESI:

python manage.py buybacks_load_types

Setup permissions

Now you can access Alliance Auth and setup permissions for your users. This is an overview of all permissions used by this app:

Name | Purpose | Code -- | -- | -- Can access this app and view buyback programs |Enabling the app for a user. This permission should be enabled for everyone who is allowed to use the app (e.g. Member state) | basic_access Can setup corporation | Add or updates the character for syncing offices and contracts. This should be limited to users with admins / leadership privileges. | setup_retriever Can manage buyback programs | User with this permission can manage the buyback programs and notifications | manage_programs

Setup corp

Finally you need to set a corporation with the character that will be used for fetching the corporation offices, contracts and related structures. Just click on Setup Corp and add the requested token.

Note that only users with the appropriate permission will be able to see and use this button.

Note that the respective character needs to be a director for the corporation.

Define programs

Let's say your corp has an ORE buyback program and you want to use this tool for that. First, you need to click on ** Create Program** and fill the name of the program.

Note that only users with the appropriate permission will be able to see and use this button.

Once it is created, you should be able to add all the locations (where your corp has an office) denoting the structures or stations to create the contracts for. You might only accept the ores in certain corp refineries and don't want people to send it other structures.

You should also be able to add all the items and the percentage the corp skims on top of the price. For example, for your ORE buyback program, add Plagioclase with brokerage set at 20%.

That's it. The buybacks program is fully created and ready to be used.

Calculating

Any character can use one of the buyback programs by clicking on Use button on one of the program. Once done, they need to select the location and can copy-paste the items they want to send to the corp. When they click on Calculate , the app calculates the exact amount based on the prices defined in the program and shows them that total value.

Once they see the total value, they would need to send an in-game contract for the exact amount and then click on ** Notify** to notify the app about it.

Once the corp accepts a contract, our contracts sync feature would automatically match the corresponding notification ( based on the total price, items with quantities and the location of the contract) and store it in the statistics.

Updating

To update your existing installation of Buybacks first enable your virtual environment.

Then run the following commands from your AA project directory (the one that contains manage.py).

pip install -U aa-buybacks2
python manage.py migrate
python manage.py collectstatic
python manage.py buybacks_load_types

Finally restart your AA supervisor services.

Tips & Tricks

  • If you want to edit the brokerage of an item in a program, you can just add the item with the new brokerage and it will update the existing one.

TODO

  • Use refined value to calculate OREs
  • Set refining percentage per item
  • Statistics filtering

Metadata

Release files for aa-buybacks2 0.2.1

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

Source distribution (sdist)

Source distribution for aa-buybacks2 0.2.1
File Size Uploaded Provenance Actions
aa-buybacks2-0.2.1.tar.gz 36.3 kB Without provenance Details for aa-buybacks2-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aa-buybacks2 0.2.1
File Interpreter ABI Platform Actions
aa_buybacks2-0.2.1-py3-none-any.whl Python 3 none any Details for aa_buybacks2-0.2.1-py3-none-any.whl

Total release size: 85.7 kB

Release files / aa-buybacks2-0.2.1.tar.gz

Download URL aa-buybacks2-0.2.1.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fce047ad432340aaa568d424ecd3bd463310726dc6a6aae5b1126b87daee13e2
BLAKE2b-256 checksum
How to use checksums
4640abe3a9a36c9b821348a5870dacff13611e9499aff47083aff2381e9315bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Release files / aa_buybacks2-0.2.1-py3-none-any.whl

Download URL aa_buybacks2-0.2.1-py3-none-any.whl
Size 49.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91ac01e8bb15dc0114054ed907053936a9fc8ab3a12253fb938dfd2cc64a7040
BLAKE2b-256 checksum
How to use checksums
e25d8c0eda8ecfd102d5f08d555b413c2544b8ed6d95cb455966ebc2de75423c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

Security for aa-buybacks2 0.2.1

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

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