


{"id":4435,"date":"2025-01-01T14:22:08","date_gmt":"2025-01-01T14:22:08","guid":{"rendered":"https:\/\/yininit.nl\/?post_type=blossom-portfolio&#038;p=4435"},"modified":"2025-01-01T21:31:48","modified_gmt":"2025-01-01T21:31:48","slug":"inrichting-stap-1","status":"publish","type":"blossom-portfolio","link":"https:\/\/yininit.nl\/index.php\/portfolio\/inrichting-stap-1\/","title":{"rendered":"Inrichting &#8211; Stap 1: VENV, GITHUB,"},"content":{"rendered":"\n<p class=\"has-colibri-color-2-color has-text-color has-link-color wp-elements-397009d1ca6aa1e973c42966177adb85\">venv\\Scripts\\activate<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Samenvatting uitvoeren commando&#8217;s vanuit CMD:<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>Context<\/strong><\/th><th><strong>Wanneer te gebruiken?<\/strong><\/th><th><strong>Voorbeelden<\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Willekeurige directory<\/strong><\/td><td>Voor systeem-gerelateerde acties of tools die overal beschikbaar zijn.<\/td><td><code>docker --version<\/code>, <code>git config<\/code>, <code>docker run hello-world<\/code><\/td><\/tr><tr><td><strong>CKBA-directory<\/strong><\/td><td>Voor acties of bestanden specifiek voor jouw project.<\/td><td><code>git init<\/code>, <code>docker build<\/code>, <code>echo \"venv\/\" &gt; .gitignore<\/code><\/td><\/tr><tr><td><strong>Venv geactiveerd<\/strong><\/td><td>Voor Python-specifieke acties, zoals installeren van pakketten of draaien van je applicatie.<\/td><td><code>pip install fastapi<\/code>, <code>python app\/main.py<\/code>, <code>pip freeze &gt; requirements.txt<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Belangrijk<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Volgorde van acties<\/strong>:\n<ol class=\"wp-block-list\">\n<li>Ga naar je CKBA-directory:bashCode kopi\u00ebren<code>cd pad\/naar\/ckba<\/code><\/li>\n\n\n\n<li>Activeer je venv:bashCode kopi\u00ebren<code>venv\\Scripts\\activate # Windows CMD<\/code><\/li>\n\n\n\n<li>Voer Python-gerelateerde commando&#8217;s uit.<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Docker-commando&#8217;s<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Deze kun je uitvoeren zonder de venv te activeren.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Hybride Setup voor CKBA<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Wat lokaal draaien?<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Lichte onderdelen<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Python-code (FastAPI-backend).<\/li>\n\n\n\n<li>Kleine FAISS-vectorstore met testdata.<\/li>\n\n\n\n<li>WordPress-plugin-ontwikkeling.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Tools<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Python, Git, en Docker voor lokale ontwikkeling.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Wat extern draaien?<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Zware onderdelen<\/strong>:\n<ul class=\"wp-block-list\">\n<li>PostgreSQL-database: Gebruik Railway of een andere VPS.<\/li>\n\n\n\n<li>Productiebackend en grotere datasets: Deploy in de cloud met Docker.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Externe tools<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Railway of DigitalOcean voor hosting.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Stap 1: Python en Git installeren<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. Python installeren<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Download Python<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Ga naar de offici\u00eble website: <a href=\"https:\/\/www.python.org\/downloads\/\">Python Downloads<\/a>.<\/li>\n\n\n\n<li>Kies <strong>Python 3.10<\/strong> of hoger.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Installeer Python<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Zorg dat de optie <strong>&#8220;Add Python to PATH&#8221;<\/strong> is aangevinkt tijdens de installatie.<\/li>\n\n\n\n<li>Volg de standaardinstallatieprocedure.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Controleer Python-installatie<\/strong>: Open een terminal (Command Prompt, PowerShell of Terminal) en voer het volgende uit:bashCode kopi\u00ebren<code>python --version <\/code>Je zou een versie moeten zien, zoals <code>Python 3.10.x<\/code>.<\/li>\n\n\n\n<li><strong>Upgrade pip<\/strong>:bashCode kopi\u00ebren<code>python -m pip install --upgrade pip<\/code><\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. Virtuele omgeving instellen<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Maak een projectmap aan<\/strong>:bashCode kopi\u00ebren<code>mkdir ckba cd ckba<\/code><\/li>\n\n\n\n<li><strong>Maak een virtuele omgeving<\/strong>:bashCode kopi\u00ebren<code>python -m venv venv<\/code><\/li>\n\n\n\n<li><strong>Activeer de virtuele omgeving<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Windows<\/strong>:bashCode kopi\u00ebren<code>venv\\Scripts\\activate<\/code><\/li>\n\n\n\n<li><strong>Mac\/Linux<\/strong>:bashCode kopi\u00ebren<code>source venv\/bin\/activate<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Controleer of de virtuele omgeving actief is<\/strong>: Je ziet <code>(venv)<\/code> voor je terminalprompt.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. Git installeren<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Download Git<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Ga naar de offici\u00eble website: <a href=\"https:\/\/git-scm.com\/\">Git Downloads<\/a>.<\/li>\n\n\n\n<li>Kies de versie die geschikt is voor jouw besturingssysteem.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Installeer Git<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Volg de installatie-instructies. Je kunt meestal de standaardinstellingen gebruiken.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Configureer Git<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Stel je naam en e-mail in:bashCode kopi\u00ebren<code>git config --global user.name \"Jouw Naam\" git config --global user.email \"jouw.email@example.com\"<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Controleer Git-installatie<\/strong>:bashCode kopi\u00ebren<code>git --version <\/code>Je zou een versie moeten zien, zoals <code>git version 2.x.x<\/code>.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. Project initialiseren in Git<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Initialiseer Git in je projectmap<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Ga naar je <code>ckba<\/code>-map en voer het volgende uit:bashCode kopi\u00ebren<code>git init<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Maak een <code>.gitignore<\/code> bestand<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Voeg bestanden toe die je niet wilt tracken:markdownCode kopi\u00ebren<code>venv\/ __pycache__\/ *.pyc .DS_Store<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Commit je eerste bestanden<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Voeg een basisbestand toe (bijvoorbeeld <code>README.md<\/code>) en commit:bashCode kopi\u00ebren<code>echo \"# CKBA Project\" &gt; README.md git add . git commit -m \"Initial commit for CKBA setup\"<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Maak een GitHub-repository aan<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Ga naar <a href=\"https:\/\/github.com\/\">GitHub<\/a> en maak een nieuwe repository aan.<\/li>\n\n\n\n<li>Koppel je lokale Git-repository aan de GitHub-repo:bashCode kopi\u00ebren<code>git remote add origin https:\/\/github.com\/jouw-gebruikersnaam\/ckba.git git branch -M main git push -u origin main<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Checklist voor Stap 1<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python ge\u00efnstalleerd en geconfigureerd.<\/li>\n\n\n\n<li>Virtuele omgeving gemaakt en geactiveerd.<\/li>\n\n\n\n<li>Git ge\u00efnstalleerd en ingesteld.<\/li>\n\n\n\n<li>GitHub-repository aangemaakt en gekoppeld.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>venv\\Scripts\\activate Samenvatting uitvoeren commando&#8217;s vanuit CMD: Context Wanneer te gebruiken? Voorbeelden Willekeurige directory Voor systeem-gerelateerde acties of tools die overal beschikbaar zijn. docker &#8211;version, git config, docker run hello-world CKBA-directory Voor acties of bestanden specifiek voor jouw project. git init, docker build, echo &#8220;venv\/&#8221; &gt; .gitignore Venv geactiveerd Voor Python-specifieke acties, zoals installeren van pakketten [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3308,"template":"","blossom_portfolio_categories":[30],"class_list":["post-4435","blossom-portfolio","type-blossom-portfolio","status-publish","has-post-thumbnail","hentry","blossom_portfolio_categories-ckba"],"_links":{"self":[{"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/blossom-portfolio\/4435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/blossom-portfolio"}],"about":[{"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/types\/blossom-portfolio"}],"author":[{"embeddable":true,"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/media\/3308"}],"wp:attachment":[{"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/media?parent=4435"}],"wp:term":[{"taxonomy":"blossom_portfolio_categories","embeddable":true,"href":"https:\/\/yininit.nl\/index.php\/wp-json\/wp\/v2\/blossom_portfolio_categories?post=4435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}