Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-message-format
Commits
1ecd7393
Unverified
Commit
1ecd7393
authored
1 year ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
docs: add instructions for pip installing schema
parent
f0b2f98b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
README.md
README.md
+26
-2
No files found.
README.md
View file @
1ecd7393
...
...
@@ -79,8 +79,32 @@ Run the command below
python3 -m unittest tests/test_schemas.py
```
# Quick Links
#
# Quick Links
1.
[
Generated Swagger Docs (recommended to look at this)
](
https://git.noc.ac.uk/communications-backbone-system/backbone-message-format/-/blob/dev/project/soar/swagger.json
)
2.
[
Schema Fields Definitions
](
https://git.noc.ac.uk/communications-backbone-system/backbone-message-format/-/tree/dev/formats
)
3.
[
JSON Schema Examples
](
https://git.noc.ac.uk/communications-backbone-system/backbone-message-format/-/tree/dev/examples
)
4.
Ongoing Project:
[
SoAR README.md
](
https://git.noc.ac.uk/communications-backbone-system/backbone-message-format/-/blob/dev/project/soar/SOAR_README.md
)
\ No newline at end of file
4.
Ongoing Project:
[
SoAR README.md
](
https://git.noc.ac.uk/communications-backbone-system/backbone-message-format/-/blob/dev/project/soar/SOAR_README.md
)
## Installing
You can install the message formats as a package with pip
```
requirements.txt
backbone-message-format @ git+https://git.noc.ac.uk/communications-backbone-system/backbone-message-format.git@v0.1.0#egg=backbone-message-format
```
### Importing the formats
```
python
import
backbone_formats
```
### Importing the compiled schema
```
python
import
importlib.resources
import
soar_schema
import
json
with
importlib
.
resources
.
open_text
(
soar_schema
,
"swagger.json"
)
as
file
:
schema
=
json
.
load
(
file
)
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment