Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Packaging #7

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
pip install pytest &&
pip install pytest-asyncio &&
python -m pytest src/onepassword/*.py
python3 -m pytest sdk/onepassword/*.py

- name: Lint with Ruff
run: |
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.pytest_cache
.idea
*__pycache__
dist/
onepassword.egg-info/
.DS_Store
build/
4 changes: 2 additions & 2 deletions src/onepassword/example.py → example/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

async def main():
# Your service account token here
token = os.environ("OP_SERVICE_ACCOUNT_TOKEN")
token = os.getenv("OP_SERVICE_ACCOUNT_TOKEN")

# Connect to 1Password
client = await Client.authenticate(auth=token, integration_name=DEFAULT_INTEGRATION_NAME, integration_version=DEFAULT_INTEGRATION_VERSION)

# Retrieve secret from 1Password
value = await client.secrets.resolve("op://Test Login/test_username")
value = await client.secrets.resolve("op://Russian Blue Vault/hers/department")
print(value)

if __name__ == '__main__':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import op_uniffi_core
9 changes: 9 additions & 0 deletions lib/op_uniffi_core_linux_amd64/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from setuptools import setup, find_packages

setup(
name='sdk-core-linux-amd64',
version='0.1.0',
packages=find_packages(),
author='1Password',
url='https://github.com/1Password/onepassword-sdk-python',
)
1 change: 1 addition & 0 deletions lib/op_uniffi_core_mac_arm64/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include sdk_core_mac_arm64/libop_uniffi_core.dylib
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Metadata-Version: 2.1
Name: sdk_core_darwin_arm64
Version: 0.1.0b1
Home-page: https://github.com/1Password/onepassword-sdk-python
Author: 1Password
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MANIFEST.in
setup.py
sdk_core_darwin_arm64/__init__.py
sdk_core_darwin_arm64/op_uniffi_core.py
sdk_core_darwin_arm64.egg-info/PKG-INFO
sdk_core_darwin_arm64.egg-info/SOURCES.txt
sdk_core_darwin_arm64.egg-info/dependency_links.txt
sdk_core_darwin_arm64.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sdk_core_darwin_arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import op_uniffi_core
Loading
Loading