Skip to content

samsarahq/samsara-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[UNSUPPORTED] samsara

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 2020-06-15
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import samsara

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import samsara

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import samsara
from samsara.rest import ApiException
from pprint import pprint

  
  # Defining host is optional and default to https://api.samsara.com
  configuration.host = "https://api.samsara.com"
  # Enter a context with an instance of the API client
  with samsara.ApiClient(configuration) as api_client:
  # Create an instance of the API class
  api_instance = samsara.SamsaraApi(api_client)
  address = samsara.CreateAddressRequest() # CreateAddressRequest | The address to create.

  try:
      # Create an address
      api_response = api_instance.create_address(address)
    pprint(api_response)
  except ApiException as e:
  print("Exception when calling SamsaraApi->create_address: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.samsara.com

Class Method HTTP request Description
SamsaraApi create_address POST /addresses Create an address
SamsaraApi create_attribute POST /beta/attributes [beta] Create an attribute
SamsaraApi create_carrier_proposed_assignment POST /fleet/carrier-proposed-assignments Create an assignment
SamsaraApi create_contact POST /contacts Create a contact
SamsaraApi create_driver POST /fleet/drivers Create a driver
SamsaraApi create_dvir POST /fleet/dvirs Create a mechanic DVIR
SamsaraApi create_industrial_asset POST /industrial/assets Create an asset
SamsaraApi create_tag POST /tags Create a tag
SamsaraApi create_user POST /users Create a user
SamsaraApi delete_address DELETE /addresses/{id} Delete an address
SamsaraApi delete_attribute DELETE /beta/attributes/{id} [beta] Deleting an attribute
SamsaraApi delete_carrier_proposed_assignment DELETE /fleet/carrier-proposed-assignments/{id} Delete an assignment
SamsaraApi delete_contact DELETE /contacts/{id} Delete a contact
SamsaraApi delete_industrial_asset DELETE /industrial/assets/{id} Delete an existing asset
SamsaraApi delete_tag DELETE /tags/{id} Delete a tag
SamsaraApi delete_user DELETE /users/{id} Delete a user
SamsaraApi generate_document_pdf POST /fleet/documents/pdfs Create a document PDF
SamsaraApi get_address GET /addresses/{id} Retrieve an address
SamsaraApi get_attribute GET /beta/attributes/{id} [beta] Retrieve an attribute
SamsaraApi get_attributes_by_entity_type GET /beta/attributes [beta] List all attributes by entity type
SamsaraApi get_contact GET /contacts/{id} Retrieve a contact
SamsaraApi get_data_input_data_feed GET /industrial/data-inputs/data-points/feed Follow a real-time feed of data points for data inputs
SamsaraApi get_data_input_data_history GET /industrial/data-inputs/data-points/history List historical data points for data inputs
SamsaraApi get_data_input_data_snapshot GET /industrial/data-inputs/data-points List most recent data points for data inputs
SamsaraApi get_data_inputs GET /industrial/data-inputs List all data inputs
SamsaraApi get_document_pdf GET /fleet/documents/pdfs/{id} Query a document PDF
SamsaraApi get_driver GET /fleet/drivers/{id} Retrieve a driver
SamsaraApi get_driver_efficiency GET /beta/fleet/drivers/efficiency [beta] List driver efficiency
SamsaraApi get_driver_tachograph_activity GET /fleet/drivers/tachograph-activity/history Get driver tachograph activity
SamsaraApi get_driver_tachograph_files GET /fleet/drivers/tachograph-files/history Get tachograph driver files
SamsaraApi get_dvir_defects GET /fleet/defects/history Get all defects
SamsaraApi get_dvir_history GET /fleet/dvirs/history Get all DVIRs
SamsaraApi get_equipment GET /fleet/equipment/{id} Retrieve a unit of equipment
SamsaraApi get_equipment_locations GET /fleet/equipment/locations Get most recent locations for all equipment
SamsaraApi get_equipment_locations_feed GET /fleet/equipment/locations/feed Follow feed of equipment locations
SamsaraApi get_equipment_locations_history GET /fleet/equipment/locations/history Get historical equipment locations
SamsaraApi get_equipment_stats GET /fleet/equipment/stats Get most recent stats for all equipment
SamsaraApi get_equipment_stats_feed GET /fleet/equipment/stats/feed Follow a feed of equipment stats
SamsaraApi get_equipment_stats_history GET /fleet/equipment/stats/history Get historical equipment stats
SamsaraApi get_hos_clocks GET /fleet/hos/clocks Get HOS clocks
SamsaraApi get_hos_logs GET /fleet/hos/logs Get HOS logs
SamsaraApi get_industrial_assets GET /industrial/assets List all assets
SamsaraApi get_organization_info GET /me Get information about your organization
SamsaraApi get_safety_events GET /fleet/safety-events List all safety events.
SamsaraApi get_tag GET /tags/{id} Retrieve a tag
SamsaraApi get_user GET /users/{id} Retrieve a user
SamsaraApi get_vehicle GET /fleet/vehicles/{id} Retrieve a vehicle
SamsaraApi get_vehicle_locations GET /fleet/vehicles/locations Locations snapshot
SamsaraApi get_vehicle_locations_feed GET /fleet/vehicles/locations/feed Locations feed
SamsaraApi get_vehicle_locations_history GET /fleet/vehicles/locations/history Historical locations
SamsaraApi get_vehicle_stats GET /fleet/vehicles/stats Stats snapshot
SamsaraApi get_vehicle_stats_feed GET /fleet/vehicles/stats/feed Stats feed
SamsaraApi get_vehicle_stats_history GET /fleet/vehicles/stats/history Historical stats
SamsaraApi get_vehicle_tachograph_files GET /fleet/vehicles/tachograph-files/history Get tachograph vehicle files
SamsaraApi list_addresses GET /addresses List all addresses
SamsaraApi list_carrier_proposed_assignments GET /fleet/carrier-proposed-assignments Retrieve assignments
SamsaraApi list_contacts GET /contacts List all contacts
SamsaraApi list_drivers GET /fleet/drivers List all drivers
SamsaraApi list_equipment GET /fleet/equipment List all equipment
SamsaraApi list_tags GET /tags List all tags
SamsaraApi list_user_roles GET /user-roles List all user roles
SamsaraApi list_users GET /users List all users
SamsaraApi list_vehicles GET /fleet/vehicles List all vehicles
SamsaraApi patch_industrial_asset PATCH /industrial/assets/{id} Update an asset
SamsaraApi patch_tag PATCH /tags/{id} Update a tag
SamsaraApi replace_tag PUT /tags/{id} Update a tag
SamsaraApi update_address PATCH /addresses/{id} Update an address
SamsaraApi update_attribute PATCH /beta/attributes/{id} [beta] Update an attribute
SamsaraApi update_contact PATCH /contacts/{id} Update a contact
SamsaraApi update_driver PATCH /fleet/drivers/{id} Update a driver
SamsaraApi update_dvir PATCH /fleet/dvirs/{id} Resolve a DVIR
SamsaraApi update_dvir_defect PATCH /fleet/defects/{id} Update a defect
SamsaraApi update_user PATCH /users/{id} Update a user
SamsaraApi update_vehicle PATCH /fleet/vehicles/{id} Update a vehicle

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

About

Python SDK for the Samsara REST API.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages