Skip to main content

The WEBFLEET.connect API connects software applications with the Webfleet fleet management solution. Via WEBFLEET.connect you can enhance the value of all types of business solutions, including routing and scheduling optimization, ERP, Transport Management System (TMS), supply chain planning, asset management, and much more.

Project description

WebfleetConnect

Webfleet logo

Package to consume WEBFLEET.connect API.

PyPI version

The WEBFLEET.connect API connects software appli­ca­tions with the Webfleet fleet management solution. Via WEBFLEET.connect you can enhance the value of all types of business solutions, including routing and scheduling optimization, ERP, Transport Management System (TMS), supply chain planning, asset management, and much more.

Check also the version for:

Installation

Install it with:

$ pip install webfleet-connect

Usage

from webfleet_connect import WebfleetConnect

webfleet_connect = WebfleetConnect.create()
response = webfleet_connect.show_object_report_extern()
response.to_hash() # [{:objectno=>"858EU4", :objectname=>"YRT-MMD2439", :objectclassname=>"sales", ...

WebfleetConnect.create() returns a new Session object which has the capabilities to request info from the WEBFLEET.connect API.

The Webfleet credential are taken from the env variables WEBFLEET_CONNECT_ACCOUNT, WEBFLEET_CONNECT_USERNAME, WEBFLEET_CONNECT_PASSWORD and WEBFLEET_CONNECT_APIKEY (if you want to know more about env variables check this link).

If your system needs to work with multiple accounts or you need to specify the credentials dynamically for some other reason, you can do it this way:

params = {
  'account': 'companyName',
  'username': 'dev',
  'password': 'VLm5PpiZST6U',
  'apikey': 'ZSksD88s-F7Uf'
}

webfleet_connect = WebfleetConnect.create(params)

When you use one of the methods of this gem, like for example show_vehicle_report_extern, this returns a WebfleetConnectResponse object which you can do:

response = webfleet_connect.show_vehicle_report_extern()

response.url()         # gets the url to fetch the informtion from WEBFLEET.connect
response.status_code() # gets the status code of the request
response.str()         # returns the response message as plain text as is returned by WEBFLEET.connectby WEBFLEET.connect
response.to_hash()     # returns the data as a ruby Array/Hash object

The methods available in this package are the same that are documented in the WEBFLEET.connect docs page just changed from cammelCase to snake_case. See below the list of methods.

Params

In order to add params to a request is as easy as passing a hash of options in the request like:

params = {
  'filterstring': 'ECO',
  'objectgroupname': 'Vehiculos',
  'ungroupedonly': True
}

response = webfleet_connect.show_vehicle_report_extern(params)

The rangefrom_string and rangeto_string can accept Time objects:

from datetime import datetime, timedelta

start_date = datetime.now()
end_date = start_date + timedelta(days=1)

params = {
  'range_pattern': 'ud',
  'rangefrom_string': start_date,
  'rangeto_string': end_date
}

response = webfleet_connect.show_event_report_extern(params)

The range_pattern can accept the values: today, yesterday, two_days_ago, three_days_ago, four_days_ago, five_days_ago, six_days_ago, current_week, last_week, two_weeks_ago, three_weeks_ago, floating_week, last_floating_week, two_floating_weeks_ago, three_floating_weeks_ago, current_month, last_month, two_months_ago, three_months_ago, user_defined_range, ud

params = { 'range_pattern': 'today' }

response = webfleet_connect.show_event_report_extern(params)

Extra config

The WebfleetConnect::Session object works with the default configuration:

'lang': 'en', 'format': 'json', 'useUTF8': False, 'useISO8601': False

but you can change the default configuration when you create the object:

credentials = {
  'account': 'companyName',
  'username': 'dev',
  'password': 'VLm5PpiZST6U',
  'apikey': 'ZSksD88s-F7Uf'
}

config = {
  'lang': 'de',
  'format': 'csv',
  'useUTF8': True
}

params = credentials.update(config)

webfleet_connect = WebfleetConnect.create(params)

Methods list

Mesage queues:

Objects:

Orders:

Messages:

Drivers:

Addresses:

Events:

Trips and working times:

Miscellaneous reports:

Geocoding and routing:

Configuration and security:

User management:

Vehicle maintenance:

Reporting:

Areas:

LINK.connect:

Plugins:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webfleet_connect-0.1.22.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

webfleet_connect-0.1.22-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file webfleet_connect-0.1.22.tar.gz.

File metadata

  • Download URL: webfleet_connect-0.1.22.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for webfleet_connect-0.1.22.tar.gz
Algorithm Hash digest
SHA256 04ff79700f811d525e673360567f73f0e48aeeb995b10cd516895df199b44481
MD5 979fb6f6f24c40f28f3a44f5de672477
BLAKE2b-256 5ff3efd311ffea9f1a89d54f551279d9cd8e0f1653510d9176b5b6a8580d2c69

See more details on using hashes here.

File details

Details for the file webfleet_connect-0.1.22-py3-none-any.whl.

File metadata

File hashes

Hashes for webfleet_connect-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 fda64fce6c4ba6848ae428eaa5724f2f6e650e75115ff61ab836bbf56d96cac6
MD5 8c412fb12a1da2eb3e4a32b15b38d7bb
BLAKE2b-256 9b3f1eca22e47622b87fc0f1181840eb7e3e06c5016d3e1553ba123c7c82411a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page