Skip to main content

Vk Connections: the shortest path from one vk user to another

Library that finds the shortest path from one vk user to another through friends.

VkConnection classes

class Create(keys)

Parametrs:

  • keys - list of 4 Vk api keys (user or community access)

Note that keys is a list with exactly 4 api keys, this requires fast work of library (each request being processed under 30 sec)

Methods of Create class

getConnection(userFrom, userTo)

Parameters:

  • userFrom – id/nickname/link to user A
  • userTo – id/nickname/link to user B

Result: A list of lists of dictionaries {id: person_id, full_name: person_full_name, photo: person_photo}

printResult(result) - prints the result from main method

Installation

pip install vkconnections

Example

import vkconnections

# Vk API Keys
firstKey = 'XXX'
secondKey = 'XXX'
thirdKey = 'XXX'
fourthKey = 'XXX'

keys = [firstKey, secondKey, thirdKey, fourthKey]  # all the keys in one list

vk = vkconnections.Create(keys)  # creating an instance of a class

# users for making a way
userFrom = "alsu"
userTo = "dm"

result = vk.getConnection(userFrom, userTo)  # receiving a result
vk.printConnection(result)  # printing result

Output:



Metadata

Release files for vkconnections 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vkconnections 0.0.6
File Size Uploaded Provenance
vkconnections-0.0.6.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vkconnections 0.0.6
File Interpreter ABI Platform
vkconnections-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / vkconnections-0.0.6.tar.gz

Download URL vkconnections-0.0.6.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0cb93288e22cf5b7f4a35f6b216e32445f200d0a61a93185b79f6d0fe3c03259
BLAKE2b-256 checksum
How to use checksums
c44a56ab0026033212c31d2188d84a89d96985ab8acde9c27ef93bfb03961e94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

Release files / vkconnections-0.0.6-py3-none-any.whl

Download URL vkconnections-0.0.6-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0aa1689aeb218b92a25d817f2ae30809a9b7e0973bc66f60dcd7ad8ab663afc3
BLAKE2b-256 checksum
How to use checksums
16ed91af4443a09c7ae89c689ec5054529315a375ebd9b4d4f4b16b9158d28f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5

Security for vkconnections 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page