This is a zeep based SOAP client wrapper for simple communication with the Bricknode SOAP API.

Overview

BFS SOAP API wrapper

Simply specify the method you are interested in.

Instantiate client

from bfs import Bfs

config = {
  "bricknode": {
      "wsdl": "https://bfs1.bricknode.com/ENVIRONMENT_NAME/api/bfsapi.asmx?WSDL",
      "credentials": {
        "username": "ENVIRONMENT_USERNAME",
        "password": "ENVIRONMENT_PASSWORD"
      },
      "identifier": "ENVIRONMENT_IDENTIFIER"
    }
}

bfs = Bfs(config)

bfs.get

accounts = bfs.get(bfs.methods.GET_ACCOUNTS)

Filter using the args parameter, support for UUIDs and strings:

instrument = bfs.get(bfs.methods.GET_INSTRUMENTS, args={
    "BrickIds": ["59cc4559-7b6b-490e-816a-89ec12ed8e94"]
})

instrument = bfs.get(bfs.methods.GET_INSTRUMENTS, args={
    "ISINs": ["SE0006259594"]
})

bfs.create

Using the skip_validation_for_empty_values flag we can create a minimal object without the client protesting

person = {
    'FirstName': 'Jane',
    'LastName': 'Doe',
    'UserName': 'janedoe',
    'Password': 'janedoe.4.ever',
    'Email': '[email protected]',
    'Domain': 'Front',
    'IsNaturalPerson': True
}

created_persons = bfs.create(bfs.methods.CREATE_PERSONS, entities=[person], skip_validation_for_empty_values=True)

bfs.execute

The execute method is added for code clarity, it has the same internal requirements as create

transfer_orders = [{
        'FromAccountBrickId': 'fbce4894-5f3c-49c3-87c4-62e8f3dae52f',
        'ToAccountBrickId': 'ef403f20-dfa7-4930-9e65-409d744856f8',
        'Units': 607500,
        'Comment': 'My comment',
        'TradeDate': '2021-01-11',
        'SettlementDate': '2021-01-13',
        'ValueDate': '2021-01-11',
        'InstrumentBrickId': '142f5c35-26b3-4697-87ac-81e672280b17',
        'OverrideOwnershipChangeValidation': True
    }]

created_transfer_orders = bfs.create(bfs.methods.CREATE_INTERNAL_INSTRUMENT_TRANSFER_ORDERS, entities=transfer_orders,
                             skip_validation_for_empty_values=True)

entities = list(map(lambda o: {'InternalTransferOrderBrickId': o['BrickId']}, created_transfer_orders))
result = bfs.execute(bfs.methods.EXECUTE_INTERNAL_TRANSFER_ORDERS, entities=entities)

bfs.update

Unless we are skipping validation, Updating an object often requires posting an entire object in with valid values, even though you most likely only want to update a few completely different ones. It is then mostly helpful to get the object and then modify it.

persons = bfs.get(bfs.methods.GET_PERSONS, args={
    'BrickIds': ['6e12ec5a-89e0-4c63-a04c-32141ef90a04']
}))

update_person = persons[0]

You can then update the property you want to change, remember to define the fields you want affected. Any other fields updated will not be persisted.

update_person['Email'] = '[email protected]'

result = bfs.update(bfs.methods.UPDATE_PERSONS,
                    entities=[update_person],
                    fields={
                        'Email': True
                    })

bfs.delete

This can be used for deleting POAs and Allocation Profiles. Not supporting DeleteFile, which requires a FileInfoDelete object as input.

brick_ids = [
    '3038fc58-731b-47c4-ae55-0aada120e200',
    'a018c8f1-f3f1-4ac5-b392-a33e2167a17e'
]

result = bfs.delete(bfs.methods.DELETE_POAS, brick_ids=brick_ids)

bfs.cancel

Enables cancellation, adding an entity as WorkflowTriggerDataEntity of the cancel request.

entity = {
    'OrderNo': 123456
}

result = bfs.cancel(bfs.methods.CURRENCY_EXCHANGE_ORDER__CANCEL, entity=entity)
Owner
Nord Fondkommission AB
Nord Fondkommission AB
ExtDNS synchronizes labeled records in docker-compose with DNS providers.

ExtDNS for docker-compose ExtDNS synchronizes labeled records in docker-compose with DNS providers. Inspired by External DNS, ExtDNS makes resources d

DNTSK 6 Dec 24, 2022
Ultimate transformation library that supports validation, contexts and aiohttp.

Trafaret Ultimate transformation library that supports validation, contexts and aiohttp. Trafaret is rigid and powerful lib to work with foreign data,

Mikhail Krivushin 174 Nov 27, 2022
Simple app that redirect fixed URL to changing URL, configurable via POST requests

This is a basic URL redirection service. It stores associations between apps and redirection URLs, for apps with changing URLs. You can then use GET r

Maxime Weyl 2 Jan 28, 2022
9SPY: a Windows RAT built in Python using sockets

9SPY 👁‍🗨 9SPY is a Windows RAT built in Python using sockets Features Features will be listed here soon, there are currenly 14 Information This is a

doop 12 Dec 01, 2022
BaseSpec is a system that performs a comparative analysis of baseband implementation and the specifications of cellular networks.

BaseSpec is a system that performs a comparative analysis of baseband implementation and the specifications of cellular networks. The key intuition of BaseSpec is that a message decoder in baseband s

SysSec Lab 35 Dec 06, 2022
API Server for VoIP analysis (CDR + Audio CODECs)

Swagger generated server Overview This server was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server, you can ea

Noor Muhammad Malik 1 Jan 11, 2022
An improved version of the original AutoDD

AutoDD = Automatically does the "due diligence" for you. If you want to know what stocks people are talking about on reddit, this little program might help you.

Steven Zhu 169 Oct 05, 2022
a decompilation of NAP36 the widevine removal software for amz and nf used by p2p groups until it stoped working due to it using expired cdm keys

NAP36 a decompilation of NAP36 the widevine removal software for amz and nf used by p2p groups until it stoped working due to it useing expired cdm ke

9 Aug 29, 2021
A simple port scanner for Web/ip scanning Port 0/500 editable inside the .py file

Simple-Port-Scanner a simple port scanner for Web/ip scanning Port 0/500 editable inside the .py file Open Cmd/Terminal Cmd Downloads Run Command: pip

YABOI 1 Nov 22, 2021
Top server mcpe Indonesia!

server_mcpe Top server mcpe Indonesia! install pkg install python pkg install git git clone https://github.com/Latip176/server_mcpe cd server_mcpe pip

Muhammad Latif Harkat 2 Jul 17, 2022
BLE parser for passive BLE advertisements

This pypi package is parsing BLE advertisements to readable data for several sensors and can be used for device tracking, as long as the MAC address is static. The parser was originally developed as

Ernst Klamer 19 Dec 26, 2022
RollerScanner — Fast Port Scanner Written On Python

RollerScanner RollerScanner — Fast Port Scanner Written On Python Installation You should clone this repository using: git clone https://github.com/Ma

68 Nov 09, 2022
Simple Port Scanner script written in Python, plans is to expand upon this script to turn it into a GUI based pen testing suite

PortScanner Simple Port Scanner script written in Python, plans is to expand upon this script to turn it into a GUI based pen testing suite. #IMPORTAN

1 Oct 23, 2021
Linux SBC featuring two wifi radios, masquerading as a USB charger.

The WiFiWart is an open source WiFi penetration device masquerading as a regular wall charger. It features a 1.2Ghz Cortex A7 MPU with two WiFi chips onboard.

Walker 151 Dec 26, 2022
Arp-spoofing, this script was written for people who want to spoof any vulnerable machine such as Wİndows, of course it could have been more sophisticatedly created but these repos will be updated constantly

ARP-SPOOF ARP spoofing is a type of attack in which a malicious actor sends falsified ARP (Address Resolution Protocol) messages over a local area net

2 Dec 28, 2021
This application aims to read all wifi passwords and visualizes the complexity in graph formation by taking into account several criteria and help you generate new random passwords.

This application aims to read all wifi passwords and visualizes the complexity in graph formation by taking into account several criteria and help you generate new random passwords.

Njomza Rexhepi 0 May 29, 2022
A Python3 discord trojan, utilizing discord webhooks for sending information.

Vape-Lite-RAT A Python3 discord trojan, utilizing discord webhooks for sending information. What you do with this code / project / idea is non of my b

NightTab 12 Oct 15, 2022
Ping Verification Python Script

Python Script Port Scanner Script WHAT IS IT? Port scanner script using Python. HOW IT WORKS Once the script has been executed, it will request the ta

AC 0 Dec 12, 2021
A pretty quick and simple interface to paramiko SFTP

A pretty quick and simple interface to paramiko SFTP. Provides multi-threaded routines with progress notifications for reliable, asynchronous transfers. This is a Python3 optimized fork of pysftp wit

14 Dec 21, 2022
Una simple herramienta para rastrear IP programada en Python

Spyrod-v2 Una simple herramienta para rastrear IP programada en Python Instalacion apt install git -y cd $HOME git clone https://github.com/Euronymou5

15 Dec 08, 2022