ungleich-tools/admin/pricing_mastodon.py

25 lines
577 B
Python
Raw Normal View History

2022-11-11 10:05:52 +00:00
#!/usr/bin/env python3
maintenance=35
networking=10
cpu=3
ram=4
hdd=(2/100)
ssd=(3.5/10)
package = {}
# maint, net, cpu, ram, hdd, ssd
package['starter'] = [ 1, 1, 4, 6, 200, 20 ]
package['community'] = [ 1, 1, 8, 12, 1000, 100 ]
package['pro'] = [ 1, 1, 16, 24, 5000, 500 ]
for k,v in package.items():
price=v[0] * maintenance
price+=v[1] * networking
price+=v[2] * cpu
price+=v[3] * ram
price+=v[4] * hdd
price+=v[5] * ssd
print(f"Price for {k} with {v[2]} CPUs, {v[3]} GB RAM, {v[4]} GB HDD, {v[5]} GB SSD = {price}")