Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/minsis/pyxwb2
Python x-wing builder and data handling
https://github.com/minsis/pyxwb2
Last synced: about 2 months ago
JSON representation
Python x-wing builder and data handling
- Host: GitHub
- URL: https://github.com/minsis/pyxwb2
- Owner: irunasroot
- Created: 2020-06-14T06:41:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T11:43:24.000Z (about 2 years ago)
- Last Synced: 2024-09-16T17:25:45.122Z (4 months ago)
- Language: Python
- Size: 339 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Python Xwing Builder for X-wing v2.0
An Xwing builder written in python
master branch:
![Unittest - master](https://github.com/minsis/pyxwb2/workflows/Python%20package/badge.svg?branch=master)beta branch:
![Unittest - beta](https://github.com/minsis/pyxwb2/workflows/Python%20package/badge.svg?branch=beta)## Installation
Install from pypi
```bash
pip install pyxwb2
```Install locally
```bash
git clone https://github.com/minsis/pyxwb2.git
cd pyxwb2
pip install .
```## Usage
There are two separate libraries to use here: one fro loading XWS import data
and one for loading the entire xwing-data pack for usage in an app or web app, etc### XWS Data Load
To load and validate an XWB json file you can load it in. With a basic XWS load you get
a full manifest of data for the pilots included.```python
from pyxwb2 import XwingSquadronsquadron = XwingSquadron()
squadron.import_squad("xws-squad.json")
```As per the XWS standard point costs are ignored on import and loaded from the manifest.
If the source is trusted then the json schema is ignored.To load trusted data
```python
from pyxwb2 import XwingSquadronsquadron = XwingSquadron(trust_source=True)
squadron.import_squad("xws-squad.json")
```### X-wing Data Pack
This loads the entire manifest data from xwing-data. Gives you access to the entire data
strcutre that it has to offer.```python
from pyxwb2 import XwingDataPackdata = XwingDataPack()
```## Citing
### xwing-data2
The dataset included is provided by guidokessels/xwing-data2 under the MIT license* Author: guidokessels
* Title: xwing-data2
* Version: 1.21.0
* Availability: [xwing-data2](https://github.com/guidokessels/xwing-data2)### xws
The ruleset spec used is provided by elistevens/xws-spec* Author: elistevens
* Title: xws-spec
* Version: 2.0.0
* Availability: [xws-spec](https://github.com/elistevens/xws-spec)