Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /randovania_randovania /tools /prepare_dev_server_config.py
| from __future__ import annotations | |
| import json | |
| import os | |
| import random | |
| from pathlib import Path | |
| from cryptography.fernet import Fernet | |
| _FOLDER = Path(__file__).parent | |
| def main(): | |
| target = _FOLDER.joinpath("dev-server-configuration.json") | |
| if target.is_file(): | |
| print(f"{target} already exists, not updated") | |
| return | |
| with target.open("w") as f: | |
| json.dump( | |
| { | |
| "server_address": "http://127.0.0.1:5000", | |
| "socketio_path": "/socket.io", | |
| "discord_client_id": 0, | |
| "server_config": { | |
| "secret_key": f"dev-server-{random.randint(1000, 9999)}", | |
| "fernet_key": Fernet.generate_key().decode("ascii"), | |
| "client_version_checking": "ignore", | |
| "database_path": os.fspath(_FOLDER.joinpath("data.db")), | |
| "discord_client_secret": "", | |
| }, | |
| }, | |
| f, | |
| indent=4, | |
| ) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 1.04 kB
- Xet hash:
- 1b85ca8754b2130f18fe4ba956a9c23516a158be031b0b784bdeedb2c45b0811
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.