Menu
e-lo
  • Home
    • Tech
    • Inspiration and about
  • Database
    • T-SQL
    • SQL Server quick
    • SQL server docs
    • MySql quick sheet
    • Postgre
    • InfluxDB
  • Programming
    • Automating the boring stuff
    • Python 101
    • Python Docs
    • Python Logging
    • cSharp Overview
    • Powershell Latest
    • Powershell 4 lang ref
    • MS Azure PS ref
    • MS Azure CLI ref
  • Azure
    • AZ-104-MS Azure Administrator 101 quick ref
    • AZ-104 Lab
    • MS Windows virtual machines in Azure
    • MS ARM Docs
    • MS ARM Tutorial
    • MS Deployment scripts (intern/extern)
    • ARM Quickstart
    • MS ARM templates 4h
  • Az Adm
    • AD 101
    • Governance and Compliance 102
    • Administration 103
    • Virtual Networking 104
    • Storage 107 (With table (NoSQL and more))
    • Virtual Machines 108
    • Azure Virtual Machines 101
    • Monitor VM (and market)
  • Linux
    • Top CMD’s
    • Useful CMD Linux
    • ss64 Linux
    • Ubuntu
    • 30 things Ubuntu 18.04
  • Zen
    • Not thinking about anything is Zen
e-lo

Azure SDK Pyhon

Posted on February 16, 2020February 16, 2020 by espenk

https://azure.github.io/azure-sdk/python_introduction.html

Python Guidelines: Introduction:

Design principles
Idiomatic
Consistent
Approachable
Diagnosable
Dependable
Python Design Principles:–PEP 20 — The Zen of Python, import this

https://www.python.org/dev/peps/pep-0020/

General Guidelines:

https://azure.github.io/azure-sdk/general_introduction.html

Gitub:

https://github.com/azure/azure-sdk-for-python


Supported python versions:
Code style:

https://www.python.org/dev/peps/pep-0008/


Naming conventions:

  • service_client = ServiceClient()
  • service_client.list_things()
  • def do_something():
  • class ThisIsCorrect(object):
    pass
  • MAX_SIZE = 4711
  • database_module.py

Method signatures:

DO NOT use, static, do not use get set, use properties

  • class GoodThing(object):
@property
def something(self):
    """ Example of a good read-only property."""
    return self._something

DO specify the parameter name when calling methods with more than two required positional parameters.

  • def foo(a, b, c):
    pass
  • def bar(d, e):
    pass
  • Yes:
    foo(a=1, b=2, c=3)
    bar(1, 2)
    bar(e=3, d=4)
  • No:
    foo(1, 2, 3)


Public vs “private”:

yes- azure.exampleservice._some_internal_module

no – azure.exampleservice.some_internal_module

Types (or not):

DO prefer structural subtyping and protocols over explicit type checks.

https://www.python.org/dev/peps/pep-0484/
Threading:

DO maintain thread affinity for user-provided callbacks unless explicitly documented to not do so.

DO explicitly include the fact that a method (function/class) is thread safe in its documentation.

Examples: asyncio.loop.call_soon_threadsafe, queue

RSS Azure

  • Azure and HITRUST publish shared responsibility matrix January 14, 2021

RSS Python

  • PEP 651: Robust Stack Overflow Handling January 18, 2021

Cloud

ARM (8) azure (23) cmd (1) Django (4) Docker (1) e-lo (2) Flask (2) Github (9) Grafana (2) Information (1) Information Retrieval (11) JAVA (1) kivy (2) Kotlin (4) linux (11) mobile (2) Natural Language Prossesing (NLP) (2) Net.Core (1) Networking and Security (2) OPC (2) PEP8 (1) Philosophy (3) Python (41) Python Networking and Security (2) Reason (2) RMQ (2) Solr (11) Sql (10) VSC (1) Warframe (2) WMVARE (4) Zabbix (7)

Recent Posts

  • 1 TODO ARM Lab 105 MS (Deployment create a pipeline)
  • 2 TODO MS ARM Template 4h
  • TODO Cryptography with Python – Caesar Cipher
  • 3 TODO Udemy AZ-104 Microsoft Azure Administrator Exam Certification (Scott Duffy)
  • ARM Lab 104 MS (Deployment and more)

Archives

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2021 e-lo | Powered by WordPress & Superb Themes