Debian Codegraph @

plyer/facades/devicename.py

raw symbols SCIP
1 '''DeviceName facade.
2
3 Returns the following depending on the platform:
4
5 * **Android**: Android Device name
6 * **Linux**: Hostname of the machine
7 * **OS X**: Hostname of the machine
8 * **Windows**: Hostname of the machine
9
10 Simple Example
11 --------------
12
13 To get the Device Name::
14
15 >>> from plyer import devicename
16 >>> devicename.device_name
17 'Oneplus 3'
18
19 .. versionadded:: 2.1.0
20 - first release
21
22
23 Supported Platforms
24 -------------------
25 Android, Windows, OS X, Linux
26
27 '''
28
29
30 class DeviceName:
31 '''
32 DeviceName facade.
33 '''
34
35 @property
36 def device_name(self):
37 '''
38 Property that returns the device name of the platform.
39 '''
40 return self._get_device_name()
41
42 # private
43 def _get_device_name(self):
44 raise NotImplementedError()