Primavera EPPM REST API client
Project description
Primavera EPPM Web Services programming
Primavera allows to use REST API.
Plans to implement:
CRUD operations:
- Read objects
- Create objects
- Update objects
- Delete object
Import/Export
- Activities
- Activity Codes
- Activity Code Assignments
- Resources
- Resource Assignments
- WBS
- Relationships
- Risks
- Role
System requirements:
- Primavera EPPM v22
- Access to P6WebServices
RestAPI documentation: REST API Documentation
How to use:
- Create Python virtual enviroment
python -m venv venv
- Install the package
pip install Primavera-REST-Api
- Example code
from Primavera_REST_Api import Primavera
EPPM_LOGIN = "testuser"
EPPM_PASSWORD = "testuser1903"
EPPM_DATABASE = "EPPM"
EPPM_PREFIX = "http://10.1.10.203:8206/p6ws/restapi"
PROJECT_SHORT_CODE = "testproj"
EXPORT_TABLES_TO_CSV = True # Export Tables to CSV file
app = Primavera(rest_api_prefix=EPPM_PREFIX,
database_name=EPPM_DATABASE,
login=EPPM_LOGIN,
password=EPPM_PASSWORD)
app.select_project(projectId=PROJECT_SHORT_CODE)
if EXPORT_TABLES_TO_CSV:
# Export tables to CSV files
directory = 'csv'
app.project.export_to_CSV(directory=directory, fields=['Id', 'Name'])
app.wbs.export_to_CSV(fields=['ParentObjectId', 'ObjectId', 'Name', 'Code'], directory=directory)
app.activity.export_to_CSV(fields=['ObjectId', 'Id', 'Name', 'PlannedDuration',
'StartDate', 'FinishDate', 'ActualDuration'], directory=directory)
app.resource.export_to_CSV(fields=['ObjectId', 'Id', 'Name'], directory=directory)
app.resourceAssignment.export_to_CSV(
fields=['ActivityObjectId', 'ResourceObjectId', 'PlannedUnits', 'ActivityId', 'ResourceId'], directory=directory)
app.resourceRole.export_to_CSV(directory=directory)
app.role.export_to_CSV(directory=directory)
# app.activity.import_CSV_to_EPPM(directory='csv', filename='import - activity.csv', delimiter=',')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Primavera_REST_Api-0.1.0.tar.gz
.
File metadata
- Download URL: Primavera_REST_Api-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a1eb4f7074afc1403e22556f306de269b2eef8b1d2a46ff0fab35560976d001 |
|
MD5 | fff58a718685db9ea5958ca141e57089 |
|
BLAKE2b-256 | 86be2f7c186989be6a576d325c6cf4647a990d6a4cea102fcb06baff13a9b9b9 |
File details
Details for the file Primavera_REST_Api-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: Primavera_REST_Api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5410c89bea60ac1979d156a252ecaba4d83fa835c1a64e2ce9b5e9b8a7249b2e |
|
MD5 | 3bdee21686dc07c52f7a9933540015e7 |
|
BLAKE2b-256 | dd14f6998270993c59f2b5e0ed31652c0bf856b90f5d3262dbb4017bc8e57eba |