-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
217cc72
commit 3e7a6ee
Showing
3 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Introduction | ||
|
||
With antares-craft you can interact with studies using AntaresWeb API or in local mode. | ||
To interact with AntaresWeb you need a token. | ||
|
||
## AntaresWeb | ||
|
||
### How to create a study | ||
|
||
``` | ||
api_config = APIconf(api_host=antares_web.url, token=your_token, verify=False) | ||
study = create_study_api("antares-craft-test", "880", api_config) | ||
``` | ||
|
||
### How to point to an existing study | ||
|
||
Not handled yet | ||
|
||
## LOCAL | ||
|
||
### How to create a study | ||
|
||
study = create_study_local("your_name", 880, {"local_path": "your_path", "study_name": "your_name"}) | ||
|
||
### How to point to an existing study | ||
|
||
`study = read_study_local(study_path)` | ||
|
||
## Apart from that every operation is the same no matter the environment you're targetting. | ||
|
||
### How to create an area with given properties: | ||
|
||
``` | ||
area_properties = AreaProperties() | ||
area_properties.energy_cost_unsupplied = 10 | ||
study.create_area("fr", area_properties) | ||
``` | ||
|
||
### How to access study areas | ||
|
||
``` | ||
area_list = study.read_areas() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters